From c493b201ed0a1b66dafda9d97b511fb483e526a2 Mon Sep 17 00:00:00 2001 From: Aceld Date: Fri, 18 Jun 2021 18:52:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E9=87=8D=E5=A4=8D=E5=85=B3?= =?UTF-8?q?=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- znet/connection.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/znet/connection.go b/znet/connection.go index 50db83e..df307cb 100644 --- a/znet/connection.go +++ b/znet/connection.go @@ -161,6 +161,7 @@ func (c *Connection) Stop() { c.Lock() defer c.Unlock() + //如果用户注册了该链接的关闭回调业务,那么在此刻应该显示调用 c.TCPServer.CallOnConnStop(c) //如果当前链接已经关闭 @@ -170,9 +171,6 @@ func (c *Connection) Stop() { fmt.Println("Conn Stop()...ConnID = ", c.ConnID) - //如果用户注册了该链接的关闭回调业务,那么在此刻应该显示调用 - c.TCPServer.CallOnConnStop(c) - // 关闭socket链接 c.Conn.Close() //关闭Writer