mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-22 08:31:30 +00:00
Fix wireguard reconnect
This commit is contained in:
parent
1b091c9b07
commit
8f8437a88d
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue