This commit is contained in:
shoopea 2019-06-14 12:54:09 +08:00
parent a2befac211
commit 1e17576004

View File

@ -8,7 +8,7 @@ import (
func clientKeepAlive(k, v interface{}) bool {
clt := v.(*MQKeepAlive)
if clt.Date.Add(2 * KeepAliveHeartBeatSeconds * time.Second).Before(time.Now()) {
if clt.Date.Add(3 * KeepAliveHeartBeatSeconds * time.Second).Before(time.Now()) {
msgs, err := clientsQueue[clt.UserID64].Channel.QueuePurge(clientsQueue[clt.UserID64].Queue.Name, false)
logOnError(err, "clientKeepAlive : Channel.QueuePurge()")
err = clientsQueue[clt.UserID64].Channel.Close()