mirror of
https://github.com/golang/go
synced 2024-11-22 20:50:05 -07:00
internal/poll: fix the verbose condition in splice
Change-Id: I0b433ea1a78632de20ea58c48c9be0f1fb6eb083 Reviewed-on: https://go-review.googlesource.com/c/go/+/271499 Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
parent
08543f0715
commit
a78b0e6721
@ -52,7 +52,7 @@ func Splice(dst, src *FD, remain int64) (written int64, handled bool, sc string,
|
||||
// If inPipe == 0 && err == nil, src is at EOF, and the
|
||||
// transfer is complete.
|
||||
handled = handled || (err != syscall.EINVAL)
|
||||
if err != nil || (inPipe == 0 && err == nil) {
|
||||
if err != nil || inPipe == 0 {
|
||||
break
|
||||
}
|
||||
n, err = splicePump(dst, prfd, inPipe)
|
||||
|
Loading…
Reference in New Issue
Block a user