[sr-dev] git:pd/websocket: modules/websocket: tidied up some of the WS connection code