diff --git a/src/YurunHttp.php b/src/YurunHttp.php index f1ab98f..54f40d4 100644 --- a/src/YurunHttp.php +++ b/src/YurunHttp.php @@ -24,7 +24,7 @@ abstract class YurunHttp /** * 版本号. */ - const VERSION = '4.3'; + const VERSION = '5.0'; /** * 设置默认处理器类. diff --git a/src/YurunHttp/Handler/Swoole.php b/src/YurunHttp/Handler/Swoole.php index 251a74e..23224d6 100644 --- a/src/YurunHttp/Handler/Swoole.php +++ b/src/YurunHttp/Handler/Swoole.php @@ -408,8 +408,8 @@ public function recvDefer($request, $timeout = null) } else { - // 状态码为5XX或者0才需要重试 - $retry = (0 === $statusCode || (5 === (int) ($statusCode / 100))); + // 状态码为5XX或者<0才需要重试 + $retry = ($statusCode <= 0 || (5 === (int) ($statusCode / 100))); } if ($retry) {