server is still logging io.ErrClosedPipe errors because of wrapped errors
Despite !30 (merged), the Snowflake server is still logging io.ErrClosedPipe
errors:
2021/06/24 17:41:12 error copying WebSocket to ORPort readfrom tcp [scrubbed]->[scrubbed]: io: read/write on closed pipe
2021/06/24 17:46:11 acceptStreams: io: read/write on closed pipe
2021/06/24 17:46:33 error copying WebSocket to ORPort readfrom tcp [scrubbed]->[scrubbed]: io: read/write on closed pipe
2021/06/24 18:20:20 error copying ORPort to WebSocket io: read/write on closed pipe
The reason is that the errors are not really io.ErrClosedPipe
; they are wrapped by errors.WithStack
in kcp-go. You can see the different using log.Printf("%T", err)
, which yields *errors.withStack
.
I was having the same problem in the dnstt server. I solved it by using errors.Is
from the go1.13 errors interface, rather than plain equality.
https://repo.or.cz/dnstt.git/commitdiff/e4dc2883efea932f1da62ef35c3e88806aed9eea
Edited by David Fifield