64aeb5dd1a
When viewer A's replay fails because viewer B superseded it mid-send, attach(A) returns False while session.attached is True for B. The handler then logged a misleading "pty input stalled … recycling terminal session" warning and issued a second close on A. Checking `session._ws is ws` limits the close to the one case it exists for: this socket is still attached and its redraw write stalled. Review finding: superseded socket's failed replay logged a stall and re-closed itself because the gate tested session-wide state.