We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c57951 commit c5078bdCopy full SHA for c5078bd
sess.go
@@ -82,10 +82,17 @@ const (
82
83
var (
84
errInvalidOperation = errors.New("invalid operation")
85
- errTimeout = errors.New("timeout")
+ errTimeout = timeoutError{}
86
errNotOwner = errors.New("not the owner of this connection")
87
)
88
89
+// timeoutError implements net.Error
90
+type timeoutError struct{}
91
+
92
+func (timeoutError) Error() string { return "timeout" }
93
+func (timeoutError) Timeout() bool { return true }
94
+func (timeoutError) Temporary() bool { return true }
95
96
97
// a system-wide packet buffer shared among sending, receiving and FEC
98
// to mitigate high-frequency memory allocation for packets, bytes from xmitBuf
0 commit comments