diff options
author | pooryorick <com.digitalsmarties@pooryorick.com> | 2019-05-01 10:44:10 (GMT) |
---|---|---|
committer | pooryorick <com.digitalsmarties@pooryorick.com> | 2019-05-01 10:44:10 (GMT) |
commit | 89c677d626e30f3439e20b018fc86d1f5f0c3246 (patch) | |
tree | 2085b55b29b980797d31786cc52a5c2418bd8628 /generic/tclIO.c | |
parent | 36073e502b5ea157b656d98ea6c86287f5fc855d (diff) | |
download | tcl-89c677d626e30f3439e20b018fc86d1f5f0c3246.zip tcl-89c677d626e30f3439e20b018fc86d1f5f0c3246.tar.gz tcl-89c677d626e30f3439e20b018fc86d1f5f0c3246.tar.bz2 |
Check for BG_FLUSH_SCHEDULED inside ChannelTimerProc
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r-- | generic/tclIO.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index 4775820..118820a 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -8511,7 +8511,7 @@ UpdateInterest( } } - if (statePtr->timer == NULL + if (!statePtr->timer && mask & TCL_WRITABLE && GotFlag(statePtr, CHANNEL_NONBLOCKING)) { @@ -8551,7 +8551,9 @@ ChannelTimerProc( Tcl_Preserve(statePtr); statePtr->timer = NULL; if (statePtr->interestMask & TCL_WRITABLE - && GotFlag(statePtr, CHANNEL_NONBLOCKING)) { + && GotFlag(statePtr, CHANNEL_NONBLOCKING) + && !GotFlag(statePtr, BG_FLUSH_SCHEDULED) + ) { /* * Restart the timer in case a channel handler reenters the event loop * before UpdateInterest gets called by Tcl_NotifyChannel. |