From d32be53e70c3e7883648de27731f0126d4f298b0 Mon Sep 17 00:00:00 2001 From: 1 <1@72wo.cn> Date: Thu, 16 Oct 2025 15:26:16 +0000 Subject: [PATCH] 1 --- common/socket/ServerEvent.go | 9 ++------- logic/service/user/GET_SIM_USERINFO.go | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/common/socket/ServerEvent.go b/common/socket/ServerEvent.go index 6bec17339..12d8c4892 100644 --- a/common/socket/ServerEvent.go +++ b/common/socket/ServerEvent.go @@ -144,9 +144,10 @@ func (s *Server) OnTraffic(c gnet.Conn) (action gnet.Action) { func (s *Server) handleTcp(conn gnet.Conn) (action gnet.Action) { - if s.discorse { + if s.discorse && !conn.Context().(*player.ClientData).IsCrossDomain { handle(conn) } + conn.Context().(*player.ClientData).IsCrossDomain = true data, err := s.codec.Decode(conn) if err != nil { if conn.Context().(*player.ClientData).ERROR_CONNUT > 5 { @@ -177,7 +178,6 @@ func (s *Server) handleTcp(conn gnet.Conn) (action gnet.Action) { func (s *Server) parser(c gnet.Conn, line []byte) { - c.Context().(*player.ClientData).IsCrossDomain = true //todo 这里待实现注入player实体 s.handler.Handle(c, line) } @@ -189,11 +189,7 @@ const CROSS_DOMAIN = "