From: Andy Pan Date: Thu, 19 Nov 2020 09:30:27 +0000 (+0800) Subject: internal/poll: fix the verbose condition in splice X-Git-Tag: go1.17beta1~1435 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a78b0e6721;p=gostls13.git 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 Reviewed-by: Ian Lance Taylor Trust: Tobias Klauser Run-TryBot: Tobias Klauser --- diff --git a/src/internal/poll/splice_linux.go b/src/internal/poll/splice_linux.go index 01baf14ed7..968bc44a5f 100644 --- a/src/internal/poll/splice_linux.go +++ b/src/internal/poll/splice_linux.go @@ -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)