Fix reset outbound

This commit is contained in:
世界
2022-11-06 10:36:19 +08:00
parent 0ad1bbea11
commit 1f63ce5dee
6 changed files with 63 additions and 17 deletions

View File

@@ -100,6 +100,12 @@ func (c *ClientBind) receive(b []byte) (n int, ep conn.Endpoint, err error) {
return
}
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()