test
This commit is contained in:
parent
dc063c4896
commit
6a1e74bdc9
@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func clientKeepAlive(k, v interface{}) bool {
|
||||
clt := v.(MQKeepAlive)
|
||||
clt := v.(*MQKeepAlive)
|
||||
if clt.Date.Add(2 * KeepAliveHeartBeatSeconds * time.Second).Before(time.Now()) {
|
||||
msgs, err := clientsQueue[clt.UserID64].Channel.QueuePurge(clientsQueue[clt.UserID64].Queue.Name, false)
|
||||
logOnError(err, "clientKeepAlive : Channel.QueuePurge()")
|
||||
|
@ -385,7 +385,7 @@ func MQKeepAliveWorker() {
|
||||
if x.Date.Add(10 * time.Second).Before(time.Now()) {
|
||||
// outdated keep-alive coming from client
|
||||
} else if v, ok := clientsKeepAlive.Load(x.UserID64); ok {
|
||||
k := v.(MQKeepAlive)
|
||||
k := v.(*MQKeepAlive)
|
||||
k.Date = x.Date
|
||||
} else {
|
||||
clt := MQClient{}
|
||||
|
Loading…
Reference in New Issue
Block a user