vali 6 жил өмнө
parent
commit
0ef888062c

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

@@ -338,6 +338,13 @@ class Events
             return;
         }
 
+        $loginstate = self::$logic->userIsLogin($client_id, $uid, $group);
+        if ($loginstate == 1) {
+            self::MySendMsg($oldcontid, (json_encode(['message_type' => 'reLoginErr', 'msg' => '正在登陆中,请稍后...'], 256)));
+            Gateway::closeClient($oldcontid);
+            return;
+        }
+
         //客服登陆验证 不符合的直接断掉
         $kfinfo = self::KfloginCheck($client_id, $message);
         if (empty($kfinfo)) {
@@ -349,14 +356,7 @@ class Events
             Gateway::closeCurrentClient();
             return true;
         }
-
-        $loginstate = self::$logic->userIsLogin($client_id, $uid, $group);
-        if ($loginstate == 1) {
-            self::MySendMsg($oldcontid, (json_encode(['message_type' => 'reLoginErr', 'msg' => '正在登陆中,请稍后...'], 256)));
-            Gateway::closeClient($oldcontid);
-            return;
-        }
-
+        
         if ($loginstate == 2) {
             $oldcontids = Gateway::getClientIdByUid($uid);
             Gateway::sendToClient($oldcontids['0'], (json_encode(['message_type' => 'reLoginErr', 'msg' => '你的账号在其它登陆,本次下线'], 256)));