mirror of
https://github.com/lkeme/BiliHelper-personal.git
synced 2025-12-19 09:30:10 +08:00
[fix] AloneTcpClient
This commit is contained in:
parent
b078d45700
commit
641ae05f33
@ -79,7 +79,7 @@ class AloneTcpClient
|
||||
*/
|
||||
private static function unPackMsg($value, string $fmt = "N")
|
||||
{
|
||||
return unpack($fmt, $value);
|
||||
return unpack($fmt, $value)[1];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -126,12 +126,6 @@ class AloneTcpClient
|
||||
throw new Exception("Connection failure");
|
||||
}
|
||||
if ($length == 4) $data = self::unPackMsg($data);
|
||||
// 防止解包异常
|
||||
if (!$data) {
|
||||
throw new Exception("Connection failure");
|
||||
} else {
|
||||
$data = $data[1];
|
||||
}
|
||||
break;
|
||||
}
|
||||
} catch (Exception $exception) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user