上传网管服务组件优化

This commit is contained in:
liwei1dao 2022-06-01 17:02:53 +08:00
parent 77313da81b
commit 02f6e13e25

View File

@ -52,7 +52,10 @@ func (this *SComp_GateRouteComp) Start() (err error) {
//注册路由
func (this *SComp_GateRouteComp) RegisterRoute(methodName string, comp reflect.Value, msg reflect.Type, fn reflect.Method) {
log.Debugf("注册用户路由【%s】", methodName)
if _, ok := this.msghandles[methodName]; ok {
this.mrlock.RLock()
_, ok := this.msghandles[methodName]
this.mrlock.RUnlock()
if ok {
log.Errorf("重复 注册网关消息【%s】", methodName)
return
}