test-errcode
Gordon 2 years ago
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…
Cancel
Save