Browse Source

Merge branch 'dev' of http://git.bocai108.com:10180/Ethan/Customer-Service into dev

Jonlin 6 years ago
parent
commit
8ab47dac47
1 changed files with 4 additions and 4 deletions
  1. 4 4
      vendor/GatewayWorker_windows/Applications/whisper/Events.php

+ 4 - 4
vendor/GatewayWorker_windows/Applications/whisper/Events.php

@@ -131,7 +131,7 @@ class Events
         } else {
             self::DebugOut($message, "OnMessage");
         }
-        //echo(Gateway::getAllClientCount());
+
         $message = json_decode($message, true);
         if (isset($message['type'])) {
             switch ($message['type']) {
@@ -407,7 +407,7 @@ class Events
             $oldcontids = Gateway::getClientIdByUid($uid);
             Gateway::sendToClient($oldcontids['0'], (json_encode(['message_type' => 'reLoginErr', 'msg' => '你的账号在其它登陆,本次下线'], 256)));
             Gateway::closeClient($oldcontids['0']);
-            sleep(2);
+            sleep(1);
         }
 
         self::$redis->hset('loginTmp:' . $uid, 'uid', time());
@@ -565,11 +565,11 @@ class Events
             return;
         }
 
+
         if (!$last && self::HasInqueue($group)) {
             Gateway::sendToClient($client_id, json_encode(['message_type' => 'inqueue', 'content' => '当前咨询人数繁多,正在排队中,请耐心等待。'], 256));
         }
 
-
         self::$redis->hset('loginTmp:' . $uid, 'uid', time());
         self::$redis->expire('loginTmp:' . $uid, 5);
 
@@ -2101,7 +2101,7 @@ class Events
 
         if ($gkf) {
             $cc = count($gkf) * $max;
-            if ($cc >= $count) {
+            if ($count >= $cc) {
                 return true;
             }
         }