From 907517595c484b85842084062da5470a90540ae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=94=E5=BF=B5?= <12574910+72wo@users.noreply.github.com> Date: Tue, 3 Mar 2026 23:41:24 +0800 Subject: [PATCH] =?UTF-8?q?```=20fix(socket):=20=E5=90=AF=E7=94=A8?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AB=AF=E8=BF=9E=E6=8E=A5=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E6=97=B6LF=E8=B5=84=E6=BA=90=E6=B8=85=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除注释以确保在客户端断开连接时正确关闭LF资源, 防止资源泄露问题。 ``` --- common/socket/ServerEvent.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/socket/ServerEvent.go b/common/socket/ServerEvent.go index 7b557b751..a742bdada 100644 --- a/common/socket/ServerEvent.go +++ b/common/socket/ServerEvent.go @@ -86,7 +86,7 @@ func (s *Server) OnClose(c gnet.Conn, err error) (action gnet.Action) { //logging.Infof("conn[%v] disconnected", c.RemoteAddr().String()) v, _ := c.Context().(*player.ClientData) - //v.LF.Close() + v.LF.Close() if v.Player != nil { v.Player.Save() //保存玩家数据