client fix

This commit is contained in:
kremsy 2014-03-03 19:54:02 +01:00 committed by Steffen Schröder
parent bc67ba224b
commit 09746110f5

View File

@ -211,14 +211,14 @@ class Client
}
else
{
$contents = '';
$contents = "";
while(strlen($contents) < 8){
$contents .= fread($this->socket, 8 - strlen($contents));
if (strlen($contents) == 0 || $contents === false)
{
//var_dump("deb6 transport error");
throw new FatalException('deb1 transport error - connection interrupted!', FatalException::INTERRUPTED);
$newContent = fread($this->socket, 8 - strlen($contents));
if($newContent === false){
var_dump("deb1 transport error" . $contents);
throw new FatalException('deb1 transport error - connection interrupted!' . $contents, FatalException::INTERRUPTED);
}
$contents .= $newContent;
}
$array_result = unpack('Vsize/Vhandle', $contents);