diff --git a/outbound/wireguard.go b/outbound/wireguard.go index a3c5b374..22e8f307 100644 --- a/outbound/wireguard.go +++ b/outbound/wireguard.go @@ -275,6 +275,7 @@ func (c *wireClientBind) Open(port uint16) (fns []conn.ReceiveFunc, actualPort u func (c *wireClientBind) receive(b []byte) (n int, ep conn.Endpoint, err error) { udpConn, err := c.connect() if err != nil { + err = &wireError{err} return } n, err = udpConn.Read(b) @@ -332,10 +333,6 @@ func (w *wireError) Temporary() bool { return true } -func (w *wireError) Unwrap() error { - return w.cause -} - type wireConn struct { net.Conn access sync.Mutex