mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Add ECONNABORTED to the partial result error list.
Allow application to receive partial result due to ECONNABORTED. Similar to how ECONNRESET and ETIMEDOUT are handled. Reported-by: syzbot+a0029790ed0bda86356e@syzkaller.appspotmail.com PiperOrigin-RevId: 430328305
This commit is contained in:
@@ -156,9 +156,12 @@ func handleIOErrorImpl(ctx context.Context, partialResult bool, errOrig, intr er
|
||||
return true, nil
|
||||
case linuxerr.Equals(linuxerr.ECONNRESET, translatedErr):
|
||||
fallthrough
|
||||
case linuxerr.Equals(linuxerr.ECONNABORTED, translatedErr):
|
||||
fallthrough
|
||||
case linuxerr.Equals(linuxerr.ETIMEDOUT, translatedErr):
|
||||
// For TCP sendfile connections, we may have a reset or timeout. But we
|
||||
// should just return n as the result.
|
||||
// For TCP sendfile connections, we may have a reset, abort or timeout. But
|
||||
// we should just return the partial result. The next call will return the
|
||||
// error without a partial IO operation.
|
||||
return true, nil
|
||||
case linuxerr.Equals(linuxerr.EWOULDBLOCK, translatedErr):
|
||||
// Syscall would block, but completed a partial read/write.
|
||||
|
||||
Reference in New Issue
Block a user