cluster fix

This commit is contained in:
zhouyuyan
2018-01-17 09:39:07 +08:00
parent 1d6f6a4a71
commit 7db7edaa17
3 changed files with 9 additions and 14 deletions

View File

@@ -288,17 +288,11 @@ func (b *Broker) handleConnection(typ int, conn net.Conn, idx uint64) {
conn: conn,
info: info,
}
c.init()
cid := c.info.clientID
if typ == ROUTER {
c.route = route{
remoteID: "",
remoteUrl: conn.RemoteAddr().String(),
}
}
var msgPool *MessagePool
var exist bool
var old interface{}
@@ -358,7 +352,7 @@ func (b *Broker) connectRouter(url, remoteID string) {
}
break
}
route := &route{
route := route{
remoteID: remoteID,
remoteUrl: conn.RemoteAddr().String(),
}