Add WebSocket reconnection

Reconnect WebSocket when a connection closed.