1f1e00278958a26aee1f8171909e35afbf887174
SendRequest and RunPushReceiver each read the conn, so a client that wanted both raced for every frame. A second listening conn is not the fix: it never sends a request, so its lastActive never moves and PushToMostRecent never picks it. mavwaked needs both on one conn. The reader now owns the socket for the life of the conn. It hands each Response to whichever SendRequest waits on that id, and each Push to the handler. SendRequest waits on its own channel, on the conn dying, on its context, or on a timeout, and forgets its slot on every path that leaves without an answer. RunPushReceiver just wires the handler and blocks. Connect opens the conn without sending anything, for a client that must hold a session before it has spoken. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013ptwopxyo3Z2kwFckHkLvN
Description
No description provided
Languages
Go
97.1%
HTML
0.9%
Shell
0.6%
CSS
0.5%
Makefile
0.3%
Other
0.6%