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