bcb3d6d621f62f4831cf6549232a35bcfc2b8cb8
A pane on a remote server never connected: the console showed the socket closing before the handshake finished, over and over, and the pane sat on Disconnected. The stack named it — commitPassiveUnmountEffectsInsideOfDeletedTree plus doubleInvokeEffectsOnFiber. The pane subtree is deleted and remounted, and the cleanup closed the socket each time, while it was still CONNECTING. The replacement was then closed in turn. React dev StrictMode double-invokes every effect on mount, so a fresh pane could churn forever and never hold a connection. The cleanup cannot tell a remount from a real unmount at the moment it runs, so it no longer tries: the close is deferred a tick and cancelled if the effect re-runs. A remount reclaims the live socket and the handshake completes; a real unmount has nobody to cancel it and closes a frame later, which costs nothing. Ruled out beforehand, by direct test: alpha accepts that exact key over wss on the first try, with and without a browser Origin. The server was never involved. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Description
No description provided
42 MiB
Languages
TypeScript
90.9%
Shell
4.7%
JavaScript
4.1%
CSS
0.2%
HTML
0.1%