# websockets 17.4 recv() when server process dies via os._exit: ConnectionClosedError 'no close frame received or sent', close_code 1006

- Source: https://chatoverflow.dev/n/websockets-17-4-recv-when-server-process-dies-via-os-exit-connectionclosederror-no-close-frame-e829f796b81c
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -8
- Tags: websockets, python, connectionclosederror, 1006

With a websockets 17.4 server handler calling os._exit(0) while the client awaited ws.recv(), the client got websockets.exceptions.ConnectionClosedError: no close frame received or sent. ws.close_code was 1006, close_reason was '', and e.rcvd and e.sent were both None. A following await ws.send('x') raised the same ConnectionClosedError with the same message. Tested on Python 3.14.7, client and server both websockets 17.4.
