Commit 7bb5b8e
committed
fix: return Err when async read returns no bytes
When read() returns with zero bytes read, this indicates an EOF.
Previously, we'd continue to read() in a loop and never return
to the caller if that happend. Fix this by returning a ProtocolError
with ErrorKind::ConnectionAborted "read zero bytes". This results in
an ProtocolFailureSuggestion::Abort.
fixes #1591 parent 8c46943 commit 7bb5b8e
1 file changed
+18
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
409 | | - | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
410 | 418 | | |
411 | 419 | | |
412 | 420 | | |
| |||
417 | 425 | | |
418 | 426 | | |
419 | 427 | | |
420 | | - | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
421 | 437 | | |
422 | 438 | | |
423 | 439 | | |
| |||
0 commit comments