1
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
昔念
2026-04-15 03:22:59 +08:00
parent a58ef20fab
commit 5f47bf0589
7 changed files with 42 additions and 19 deletions

View File

@@ -121,7 +121,23 @@ func (s *Server) OnTraffic(c gnet.Conn) (action gnet.Action) {
}
}()
ws := c.Context().(*player.ClientData).Wsmsg
client := c.Context().(*player.ClientData)
if s.discorse && !client.IsCrossDomainChecked() {
handled, ready, action := handle(c)
if action != gnet.None {
return action
}
if handled {
client.MarkCrossDomainChecked()
return gnet.None
}
if !ready {
return gnet.None
}
client.MarkCrossDomainChecked()
}
ws := client.Wsmsg
if ws.Tcp {
return s.handleTCP(c)
}