mirror of
https://github.com/fatedier/frp.git
synced 2026-04-29 04:29:11 +08:00
merge upstream
This commit is contained in:
@@ -149,7 +149,7 @@ func WrapCloseNotifyConn(c net.Conn, closeFn func()) net.Conn {
|
|||||||
func (cc *CloseNotifyConn) Close() (err error) {
|
func (cc *CloseNotifyConn) Close() (err error) {
|
||||||
pflag := atomic.SwapInt32(&cc.closeFlag, 1)
|
pflag := atomic.SwapInt32(&cc.closeFlag, 1)
|
||||||
if pflag == 0 {
|
if pflag == 0 {
|
||||||
err = cc.Close()
|
err = cc.Conn.Close()
|
||||||
if cc.closeFn != nil {
|
if cc.closeFn != nil {
|
||||||
cc.closeFn()
|
cc.closeFn()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user