Fix wireguard mutex

This commit is contained in:
世界 2023-03-23 15:43:17 +08:00
parent 4328c535a9
commit 466800aa3a
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4

View File

@ -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{})