Handling WebSocket Closure and Reconnection

When I close a websocket like this: yield* writer(new Socket.CloseEvent(1001, 'Ping timeout')) will it trigger an error so I can reconnect the websocket?
Was this page helpful?