Course lesson
Close a WebSocket Client Connection with Mock Service Worker
Let's see how our WebSocket client reacts to the connection being closed. Use the client.close() method in the event handler to reliably reproduce client connection closures.
- Duration
- 1 min
- Access
- Free
- Transcript
- Needs source
Let's see how our WebSocket client reacts to the connection being closed. Use the client.close() method in the event handler to reliably reproduce client connection closures.