Skip to content

Commit

Permalink
Code optimization.
Browse files Browse the repository at this point in the history
  • Loading branch information
twose committed Apr 18, 2019
1 parent f92107e commit 2d1500b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ public function exec()
*/
public function recv()
{
retry_recv:
_retry_recv:
if (self::STATUS_WAITING !== $this->_status) {
throw new BadMethodCallException('You can\'t recv because client is not in waiting stat.');
}
Expand All @@ -637,7 +637,7 @@ public function recv()
$timeout = $this->getTimeout();
$message = "Request timeout! the server hasn't responded over the timeout setting({$timeout}s)!";
} elseif ($statusCode === -3) {
$message = 'Connection is forcibly cut off by the remote server';
$message = 'Connection is reset by the remote server';
} else {
$message = "Linux Code {$errCode}: " . swoole_strerror($errCode);
}
Expand Down Expand Up @@ -736,7 +736,7 @@ public function recv()
if ($this->isInQueue()) {
return $this;
} else {
goto retry_recv;
goto _retry_recv;
}
}

Expand Down

0 comments on commit 2d1500b

Please sign in to comment.