This should reduce the amount of checks for None if someone doesn't want a websocket connection. The connection state is instead cleared rather than reconstructed.