Reconnecting websocket on error