1
1
Fork 0
mirror of https://github.com/mjl-/mox.git synced 2025-03-25 03:04:45 +03:00
mox/vendor/github.com/mjl-/sherpa/isclosed.go

14 lines
205 B
Go
Raw Permalink Normal View History

2023-01-30 16:27:06 +03:00
//go:build !plan9
// +build !plan9
package sherpa
import (
"errors"
"syscall"
)
func isConnectionClosed(err error) bool {
return errors.Is(err, syscall.EPIPE) || errors.Is(err, syscall.ECONNRESET)
}