From 5697afed33af9daf50e4c0d6a34b13b489799bd0 Mon Sep 17 00:00:00 2001 From: by <123456@qq.com> Date: Tue, 15 Oct 2024 09:05:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A8=83=E5=A8=83=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine/action/action_server.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/machine/action/action_server.go b/machine/action/action_server.go index ede6787..a6ad565 100644 --- a/machine/action/action_server.go +++ b/machine/action/action_server.go @@ -173,6 +173,9 @@ func SMDollMachineGrabHandler(session *netlib.Session, packetId int, data interf // 监听抓取结果返回 func DollMachineGrabResult(conn *machinedoll.Conn, snid, id int32) { + if conn == nil { + return + } num := int64(1) for { // 读取数据 @@ -183,6 +186,7 @@ func DollMachineGrabResult(conn *machinedoll.Conn, snid, id int32) { logger.Logger.Error("Failed to read response from client:", err) err := conn.Conn.Close() if err != nil { + logger.Logger.Error("conn.Conn.Close():", err) return } return