cockpit-project / console.dot

Webconsole Cloud Service
2 stars 3 forks source link

cockpit-bridge-websocket-connector should exit on websocket timeout #55

Closed martinpitt closed 2 years ago

martinpitt commented 2 years ago

If the /ws websocket gets closed (which usually happens on logout or when the user moves away from the web page), the connector should notice that and exit. If it doesn't, fix it. Add a test that this happens.

martinpitt commented 2 years ago

This actually does happen now, both on logout and when the session container dies.

DEBUG:websockets.client:< CLOSE 1000 (OK) [2 bytes]
DEBUG:websockets.client:= connection is CLOSING
DEBUG:websockets.client:> CLOSE 1000 (OK) [2 bytes]
DEBUG:websockets.client:= connection is CLOSED

and then a clean exit. So let's add a test.