Commit Graph
2 Commits
Author SHA1 Message Date
jensandClaude Sonnet 4.6 3f6f403b7b network_backend: fix crash on lost/refused connection
getpeername() raised ENOTCONN when a connect failed or the peer
closed the socket, crashing the event loop thread. Identify sockets
via the selector key's data (set at register time) instead, and
catch OSError on recv/send to cleanly close and unregister a dead
socket rather than crashing.

Also fix select(timeout=100) which waited 100 seconds instead of
100ms, causing stop() to hang after a dead socket was unregistered.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 20:48:17 +02:00
jensandClaude Sonnet 4.6 68f8196fbb backend: rename network.py to network_backend.py
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 11:21:50 +02:00