You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicfunction recv()
{
retry_recv:
if (self::STATUS_WAITING !== $this->_status) {
thrownew \BadMethodCallException('You can\'t recv because client is not in waiting stat.');
}
$this->client->recv($this->getTimeout());
$this->_status = self::STATUS_NONE;
$this->_time = microtime(true) - $this->_start_time;
$is_report = $this->getExceptionReport() & HttpExceptionMask::E_CONNECT;
$statusCode = $this->client->statusCode;
$errCode = $this->client->errCode;
if ($statusCode < 0 || $errCode !== 0) {
if ($is_report) {
if ($statusCode === -1) {
$message = 'Connect timeout! the server is not listening on the port or the network is missing!';
} elseif ($statusCode === -2) {
$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';
} else {
$message = "Linux Code {$errCode}: " . swoole_strerror($errCode);
}
$exception = newConnectException($this, $statusCode, $message);
$ret = $this->callInterceptor('exception', $exception);
if (!$ret) {
$this->tryToRevertClientToPool(true);
throw$exception;
}
} else {
// Exception is no longer triggered after an exception is ignored$this->setExceptionReport(HttpExceptionMask::E_NONE);
}
}
The text was updated successfully, but these errors were encountered:
/src/Request.php
的633
行,应为-3,项目中写成了3,部分代码:The text was updated successfully, but these errors were encountered: