wait for message when close connection
This commit is contained in:
1 parent
a7fb7f1912
commit
208a7cf0a8
1 file changed
+2
@@ -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