Automatically reconnect when websocket gets closed