disalbed setchallengtimewarning

This commit is contained in:
kremsy 2014-04-09 11:29:42 +02:00 committed by Steffen Schröder
parent f05c75143e
commit 07a63cf518
2 changed files with 7 additions and 18 deletions

View File

@ -211,22 +211,11 @@ class Client
}
else
{
$contents = "";
while(strlen($contents) < 8){
$newContent = fread($this->socket, 8 - strlen($contents));
//var_dump($contents, $newContent, strlen($contents));
if(strlen($newContent) == 0){
var_dump("deb1 transport error" . $contents);
throw new FatalException('deb1 transport error - connection interrupted!' . $contents, FatalException::INTERRUPTED);
$contents = fread($this->socket, 8);
if (strlen($contents) == 0 || $contents === false)
{
throw new FatalException('transport error - connection interrupted!', FatalException::INTERRUPTED);
}
$contents .= $newContent;
if(strlen($contents) < 8){
usleep(10);
var_dump("deb1 test new");
}
}
$array_result = unpack('Vsize/Vhandle', $contents);
$size = $array_result['size'];
$recvhandle = $array_result['handle'];
@ -240,12 +229,12 @@ class Client
if ($recvhandle == 0 || $size == 0)
{
throw new FatalException('deb2 transport error - connection interrupted!', FatalException::INTERRUPTED);
throw new FatalException('transport error - connection interrupted!', FatalException::INTERRUPTED);
}
if ($size > SIZE_MAX)
{
throw new Exception("deb3 transport error - answer too big ($size)", Exception::ANWSER_TOO_BIG);
throw new Exception("transport error - answer too big ($size)", Exception::ANWSER_TOO_BIG);
}
self::$received += $size;

View File

@ -330,7 +330,7 @@ class Dedimania implements CallbackListener, TimerListener, Plugin {
$errors = $methodResponse[0]['methods'][0]['errors'];
if ($errors) {
//TODO just temporary
$this->maniaControl->errorHandler->triggerDebugNotice("Dedimania Notice on SetChallengeTimes: " . $errors);
//$this->maniaControl->errorHandler->triggerDebugNotice("Dedimania Notice on SetChallengeTimes: " . $errors);
//trigger_error($errors);
}
}