Repository navigation
Commit 225cbac
fix: handle BrokenPipeError in LMHandler during parallel execution
When running parallel evaluations, multiple workers connect to the LMHandler
socket server. When workers complete and close their sockets, BrokenPipeError
was raised during response transmission, causing noisy error output.
Changes:
- Add _safe_send() helper that catches connection errors silently
- Handle BrokenPipeError, ConnectionError, ConnectionResetError, and OSError
separately from other exceptions
- Use _safe_send() for all socket_send() calls in handle() method
This prevents cascading errors where the exception handler tried to send
an error response on an already-broken socket.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 37f6d0b commit 225cbac
1 file changed
Lines changed: 17 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
41 | 46 | | |
42 | 47 | | |
| 48 | + | |
43 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
44 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
45 | 60 | | |
46 | 61 | | |
47 | 62 | | |
| |||
0 commit comments