Don't hang in stop() while a connection is live #6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/signaling-stop-hang"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to the peer-filter work (#5), where I noticed this while testing.
Why
SignalingChannel.stop()closed the listening server and awaitedwait_closed()before dropping the live connection. An adopted inbound connection is one of the server's accepted sockets, andwait_closed()blocks until every accepted socket is closed — so with a live inbound link,stop()hung forever.It didn't bite the running app because the link is usually dropped before shutdown, but it's a latent hang on the shutdown path.
Change
tests/test_signaling.py): shutdown with a live inbound connection, and shutdown while idle. The first hangs and times out against the old ordering — verified by temporarily reverting just the reorder.🤖 Generated with Claude Code