add fix pool for message order (#42)

* fix pool for message order

* add go modules
This commit is contained in:
joy.zhou authored and GitHub committed 2019-04-24 14:54:21 +08:00
1 parent edc46c1ee6
commit c350d16ca1
7 files changed
+251 -248

No files matched your search

+3 -3
View File
@@ -111,7 +111,7 @@ func (c *client) readLoop() {
if err != nil {
log.Error("read packet error: ", zap.Error(err), zap.String("ClientID", c.info.clientID))
msg := &Message{client: c, packet: DisconnectdPacket}
b.SubmitWork(msg)
b.SubmitWork(c.info.clientID, msg)
return
}
@@ -119,7 +119,7 @@ func (c *client) readLoop() {
client: c,
packet: packet,
}
b.SubmitWork(msg)
b.SubmitWork(c.info.clientID, msg)
}
}
@@ -361,7 +361,7 @@ func (c *client) Close() {
c.status = Disconnected
//wait for message complete
time.Sleep(1 * time.Second)
// time.Sleep(1 * time.Second)
// c.status = Disconnected
if c.conn != nil {