From 757c7586a31a9fc257cc9f0465b806b95b4236bb Mon Sep 17 00:00:00 2001 From: azw Date: Thu, 17 Aug 2023 08:51:31 +0800 Subject: [PATCH] 1 --- server/imserver/app.go | 2 +- server/imserver/wsplistener.go | 16 ++++++++++++---- third_party/f5 | 2 +- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/server/imserver/app.go b/server/imserver/app.go index 9fffb267..06a198cb 100644 --- a/server/imserver/app.go +++ b/server/imserver/app.go @@ -40,7 +40,7 @@ func (this *App) Update() { next := this.netMsgQueue.WorkList.Next() hdr, ok := next.GetData().(*f5.MsgHdr) if ok { - if hdr.MsgId < 100 { + if hdr.MsgId < f5.WSP_SS_MAX_MSGID { handler := ss.GetNetMsgHandler(hdr.MsgId) if handler != nil { switch handler.HandlerId { diff --git a/server/imserver/wsplistener.go b/server/imserver/wsplistener.go index 2ea868d6..adf24332 100644 --- a/server/imserver/wsplistener.go +++ b/server/imserver/wsplistener.go @@ -137,10 +137,18 @@ func (this *WSPListener) decodePacket(conn net.Conn, buf []byte, offset *int, bu func (this *WSPListener) parseNetPkt() { for { if hdr, ok := <-this.ch; ok { - hdr.Msg = cs.ParsePb(hdr.MsgId, hdr.Data) - if hdr.Msg != nil { - hdr.Entry.Init(hdr) - app.addNetMsg(hdr) + if hdr.MsgId < f5.WSP_SS_MAX_MSGID { + hdr.Msg = ss.ParsePb(hdr.MsgId, hdr.Data) + if hdr.Msg != nil { + hdr.Entry.Init(hdr) + app.addNetMsg(hdr) + } + } else { + hdr.Msg = cs.ParsePb(hdr.MsgId, hdr.Data) + if hdr.Msg != nil { + hdr.Entry.Init(hdr) + app.addNetMsg(hdr) + } } } } diff --git a/third_party/f5 b/third_party/f5 index ee97e3ef..096c5046 160000 --- a/third_party/f5 +++ b/third_party/f5 @@ -1 +1 @@ -Subproject commit ee97e3ef6b2f59a95675e7cdd7f0c653403eb53e +Subproject commit 096c5046c962a4bcc5873aa5b539a0900e3cf4bd