Fix transparent websocket recovery for terminals
Close retired websocket connections in stopWSClient so clients reconnect promptly instead of remaining in a stdin-only state with no returning output. Add regression coverage to verify stopWSClient actively disconnects the websocket. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -343,6 +343,9 @@ func (s *LocalServer) stopWSClient(routeKey string, expected *wsClient) {
|
||||
return
|
||||
}
|
||||
close(client.send)
|
||||
if client.conn != nil {
|
||||
_ = client.conn.Close()
|
||||
}
|
||||
<-client.done
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user