mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-14 04:43:17 +00:00
23 lines
328 B
Go
23 lines
328 B
Go
|
package wireguard
|
||
|
|
||
|
import "net"
|
||
|
|
||
|
type wireError struct {
|
||
|
cause error
|
||
|
}
|
||
|
|
||
|
func (w *wireError) Error() string {
|
||
|
return w.cause.Error()
|
||
|
}
|
||
|
|
||
|
func (w *wireError) Timeout() bool {
|
||
|
if cause, causeNet := w.cause.(net.Error); causeNet {
|
||
|
return cause.Timeout()
|
||
|
}
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
func (w *wireError) Temporary() bool {
|
||
|
return true
|
||
|
}
|