Skip to content
Snippets Groups Projects
Commit 2f5099a8 authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Kirill Yukhin
Browse files

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
parent 857ab307
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment