mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
ws update
This commit is contained in:
parent
c96d6b48d1
commit
ac8a53b1b3
@ -24,6 +24,9 @@ func RunWsAndServer(rpcPort, wsPort, prometheusPort int) error {
|
||||
}
|
||||
hubServer := NewServer(rpcPort)
|
||||
go hubServer.Start()
|
||||
if hubServer.Notification() == nil {
|
||||
panic("notification is nil")
|
||||
}
|
||||
longServer.SetMessageHandler(hubServer.Notification())
|
||||
hubServer.SetLongConnServer(longServer)
|
||||
go hubServer.LongConnServer.Run()
|
||||
|
@ -3,6 +3,7 @@ package msggateway
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/notification"
|
||||
@ -51,6 +52,7 @@ type WsServer struct {
|
||||
}
|
||||
|
||||
func (ws *WsServer) SetMessageHandler(rpcClient *notification.Check) {
|
||||
log.ZDebug(nil, "msggateway SetMessageHandler", "rpcClient", rpcClient)
|
||||
ws.MessageHandler = NewGrpcHandler(ws.validate, rpcClient)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user