This commit is contained in:
shoopea 2019-12-15 16:24:51 +08:00
parent 1b914cf427
commit 22c1f977b2

View File

@ -23,8 +23,10 @@ func setClientBusy(userID64 int64, from time.Time, duration time.Duration) error
}
func setClientIdle(userID64 int64, from time.Time) error {
fmt.Printf("setClientIdle : starting for %d.\n", userID64)
if clt, ok := getLockedClient(userID64, false); ok {
if from.UTC().After(clt.CWLastUpdate.UTC()) {
fmt.Printf("setClientIdle : updated.\n")
clt.CWBusyUntil = from
clt.CWIdle = true
clt.CWLastUpdate = from