mirror of
https://github.com/fhmq/hmq.git
synced 2026-04-24 10:38:34 +00:00
wait for message when close connection
This commit is contained in:
@@ -470,6 +470,8 @@ func (c *client) Close() {
|
||||
if c.status == Disconnected {
|
||||
return
|
||||
}
|
||||
//wait for message complete
|
||||
time.Sleep(time.Second)
|
||||
|
||||
c.smu.Lock()
|
||||
c.status = Disconnected
|
||||
|
||||
Reference in New Issue
Block a user