net.box: don't block close if called from state machine fiber
Currently, to resubscribe registered watchers net.box installs an on_connect trigger that writes IPROTO_WATCH requests to the send buffer. The requests will be sent by the net.box state machine once all on_connect triggers return. The problem is this trigger may run before a user-defined trigger that closes the connection, in which case close() will hang forever, because since #6338, the close method blocks until the send buffer is emptied, while it can't be emptied in case close is called by the state machine itself (see #5358). Let's fix this issue by making close() omit blocking if called from the state machine fiber. No user is affected, because IPROTO_WATCH hasn't been officially released yet so neither changelog nor doc is required. Closes #6824 NO_CHANGELOG=bug not released NO_DOC=NO_CHANGELOG
Loading
Please register or sign in to comment