Commit ca67fd8
fix(proxy): handle ssl.SSLWantWriteError for large SSL responses
ssl.SSLSocket.send() raises ssl.SSLWantWriteError (not BlockingIOError)
when the underlying TCP buffer is full on a non-blocking SSL socket.
SSLWantWriteError is a subclass of OSError, so it was caught by the
generic connection-close handler, closing the connection mid-response.
The client socket stayed open, leaving the caller hanging indefinitely.
Catch SSLWantWriteError alongside BlockingIOError in both send paths so
SSL connections correctly register EVENT_WRITE and retry when buffer
space becomes available.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 3e24213 commit ca67fd8
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
| 272 | + | |
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
| 291 | + | |
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
| |||
0 commit comments