去除消息分流、设计不合理
This commit is contained in:
parent
3effa6bb91
commit
f997332639
|
@ -76,11 +76,7 @@ func (slf *event) RegConnectionOpenedEvent(handle ConnectionOpenedEventHandle) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (slf *event) OnConnectionOpenedEvent(conn *Conn) {
|
func (slf *event) OnConnectionOpenedEvent(conn *Conn) {
|
||||||
if len(slf.diversionMessageChannels) == 0 {
|
log.Debug("Server", zap.String("ConnectionOpened", conn.GetID()))
|
||||||
log.Debug("Server", zap.String("ConnectionOpened", conn.GetID()))
|
|
||||||
} else {
|
|
||||||
log.Debug("Server", zap.String("ConnectionOpened", conn.GetID()), zap.Int("Node", slf.diversionConsistency.PickNode(conn.GetID())))
|
|
||||||
}
|
|
||||||
for _, handle := range slf.connectionOpenedEventHandles {
|
for _, handle := range slf.connectionOpenedEventHandles {
|
||||||
handle(slf.Server, conn)
|
handle(slf.Server, conn)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue