fix fail in cluster deploy (#86)

Co-authored-by: janson <janson@gmail.com>
This commit is contained in:
jansonandjanson authored and GitHub committed 2020-05-08 11:26:26 +08:00
1 parent 3cf90d5231
commit 3f60d23e85
2 files changed
+5

No files matched your search

+3
View File
@@ -107,6 +107,7 @@ func (c *client) init() {
c.ctx, c.cancelFunc = context.WithCancel(context.Background()) c.ctx, c.cancelFunc = context.WithCancel(context.Background())
c.subMap = make(map[string]*subscription) c.subMap = make(map[string]*subscription)
c.topicsMgr = c.broker.topicsMgr c.topicsMgr = c.broker.topicsMgr
c.routeSubMap = make(map[string]uint64)
} }
func (c *client) readLoop() { func (c *client) readLoop() {
@@ -343,6 +344,8 @@ func (c *client) ProcessSubscribe(packet *packets.SubscribePacket) {
case CLIENT: case CLIENT:
c.processClientSubscribe(packet) c.processClientSubscribe(packet)
case ROUTER: case ROUTER:
fallthrough
case REMOTE:
c.processRouterSubscribe(packet) c.processRouterSubscribe(packet)
} }
} }
+2
View File
@@ -46,6 +46,8 @@ func (c *client) SendConnect() {
return return
} }
m := packets.NewControlPacket(packets.Connect).(*packets.ConnectPacket) m := packets.NewControlPacket(packets.Connect).(*packets.ConnectPacket)
m.ProtocolName = "MQIsdp"
m.ProtocolVersion = 3
m.CleanSession = true m.CleanSession = true
m.ClientIdentifier = c.info.clientID m.ClientIdentifier = c.info.clientID