mirror of
https://github.com/lkeme/BiliHelper-personal.git
synced 2025-12-19 09:30:10 +08:00
[fix] ZoneTcpClient
This commit is contained in:
parent
d56cd94d1e
commit
5b776d5436
@ -14,6 +14,7 @@
|
||||
- 修复风暴回显过滤
|
||||
- 修复一处舰长处理
|
||||
- 修复中奖记录通知
|
||||
- 修复分区监控异常
|
||||
-
|
||||
|
||||
## v0.3.0.200410 alpha (2020-04-10)
|
||||
|
||||
@ -410,11 +410,11 @@ class ZoneTcpClient
|
||||
return self::packMsg(json_encode([
|
||||
"uid" => 0,
|
||||
"roomid" => intval($room_id),
|
||||
"protover" => 2,
|
||||
"platform" => "web",
|
||||
"clientver" => "1.10.6",
|
||||
"protover" => 2,
|
||||
"type" => 2,
|
||||
"key" => Live::getDanMuToken($room_id)
|
||||
// "key" => Live::getDanMuToken($room_id)
|
||||
]), 0x0007);
|
||||
}
|
||||
|
||||
@ -476,6 +476,10 @@ class ZoneTcpClient
|
||||
$ret = 0;
|
||||
$socket = self::$client->getResource();
|
||||
while ($length) {
|
||||
if ($length < 1 || $length > 65535) {
|
||||
Log::warning("Socket error: [{$ret}] [{$length}]" . PHP_EOL);
|
||||
throw new Exception("Connection failure");
|
||||
}
|
||||
$cnt = 0;
|
||||
$r = array($socket);
|
||||
$w = NULL;
|
||||
@ -489,7 +493,7 @@ class ZoneTcpClient
|
||||
}
|
||||
$ret = socket_recv($socket, $buffer, $length, 0);
|
||||
if ($ret < 1) {
|
||||
print_r("Socket error: [{$ret}] [{$length}]" . PHP_EOL);
|
||||
Log::warning("Socket error: [{$ret}] [{$length}]" . PHP_EOL);
|
||||
throw new Exception("Connection failure");
|
||||
}
|
||||
$data .= $buffer;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user