mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-22 00:21:30 +00:00
Fix wireguard mutex
This commit is contained in:
parent
4328c535a9
commit
466800aa3a
|
@ -100,14 +100,10 @@ func (c *ClientBind) receive(b []byte) (n int, ep conn.Endpoint, err error) {
|
|||
}
|
||||
|
||||
func (c *ClientBind) Reset() {
|
||||
c.connAccess.Lock()
|
||||
defer c.connAccess.Unlock()
|
||||
common.Close(common.PtrOrNil(c.conn))
|
||||
}
|
||||
|
||||
func (c *ClientBind) Close() error {
|
||||
c.connAccess.Lock()
|
||||
defer c.connAccess.Unlock()
|
||||
common.Close(common.PtrOrNil(c.conn))
|
||||
if c.done == nil {
|
||||
c.done = make(chan struct{})
|
||||
|
|
Loading…
Reference in a new issue