Skip to content

Commit

Permalink
Merge pull request #49 from Rexeh/Shutdown-Fix---Race
Browse files Browse the repository at this point in the history
Fix race condition with #shutdown by @Rexeh
  • Loading branch information
felixms authored Jun 1, 2021
2 parents 5ec6c89 + d36fce7 commit 28c72ee
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions arc.php
Original file line number Diff line number Diff line change
Expand Up @@ -898,17 +898,17 @@ public function splitPacket( $data )
{
$responseCode = $this->readPackageRaw($data);

if ($responseCode[1] == "01")
{
if ($responseCode[3] !== "00")
{
return substr($data, 9);
}
else
{
return substr($data, 12);
}
}
if ($responseCode[1] == "01") {

if (sizeof($responseCode) < 4) {
return "true";
}
if (sizeof($responseCode) >= 4 && $responseCode[3] !== "00") {
return substr($data, 9);
} else {
return substr($data, 12);
}
}

return '';
}
Expand Down

0 comments on commit 28c72ee

Please sign in to comment.