增加连接的connection_id
This commit is contained in:
@ -60,7 +60,7 @@ func NewWebsocketServe(wsInstanceList ...abstract.IWebsocket) error {
|
||||
go func(wsInstance abstract.IWebsocket) {
|
||||
defer wg.Done()
|
||||
// 初始化ws server
|
||||
_ = lock.Lock("")
|
||||
_ = lock.Lock()
|
||||
if _, exist := ginRouterTable[wsInstance.GetServerPort()]; !exist {
|
||||
ginRouterTable[wsInstance.GetServerPort()] = &Server{
|
||||
ginRouter: gin.Default(),
|
||||
@ -70,7 +70,7 @@ func NewWebsocketServe(wsInstanceList ...abstract.IWebsocket) error {
|
||||
if _, exist := commandTable[wsInstance.GetModuleFlag()]; !exist {
|
||||
commandTable[wsInstance.GetModuleFlag()] = make(map[string]abstract.ICommand)
|
||||
}
|
||||
_ = lock.Unlock("")
|
||||
_ = lock.Unlock()
|
||||
routerGroup := ginRouterTable[wsInstance.GetServerPort()].ginRouter.Group(wsInstance.GetModuleFlag())
|
||||
// 注册路由
|
||||
for _, path := range wsInstance.HandshakeURL() {
|
||||
|
Reference in New Issue
Block a user