You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The existing tests close connections from the client side only. That leaves the
one case where the handoff genuinely changes which goroutine does what
unexercised: a close started while a frame is being processed runs on the
handoff goroutine, while the read loop sits in the channel receive waiting for
that same frame.
Two cases, each run against both variants so a divergence shows up rather than
just an absence of failure:
- a server-side Disconnect while the connection is otherwise quiet, checking
the read loop is unblocked, the hub drains, and the peer sees the connection
end;
- a Disconnect issued from inside an RPC handler, which is the goroutine
question above. Teardown must complete and must not deadlock against the
close handshake, which transport close waits on and the read loop is the one
to drain.
Both pass on either setting, which is what the design predicts: handle() is
synchronous, so no handoff goroutine is ever in flight when the read loop exits,
and the teardown sequence is reached exactly as it was before.
0 commit comments