From 99ee6c2a7fa552e0f632c22528107c29ef258ad1 Mon Sep 17 00:00:00 2001 From: 1 <1@72wo.cn> Date: Mon, 6 Oct 2025 07:28:46 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BA=95=E5=B1=82=E6=8E=A5?= =?UTF-8?q?=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/socket/ServerEvent.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/socket/ServerEvent.go b/common/socket/ServerEvent.go index 0e916c71..833fad8c 100644 --- a/common/socket/ServerEvent.go +++ b/common/socket/ServerEvent.go @@ -126,7 +126,12 @@ func (s *Server) OnTraffic(c gnet.Conn) (action gnet.Action) { s.parser(c, msg.Payload) }) } - + if c.InboundBuffered() > 0 { + if err := c.Wake(nil); err != nil { // wake up the connection manually to avoid missing the leftover data + logging.Errorf("failed to wake up the connection, %v", err) + return gnet.Close + } + } return gnet.None }