diff --git a/src/producer/Producer.php b/src/producer/Producer.php index 75dbc95..a117d5b 100644 --- a/src/producer/Producer.php +++ b/src/producer/Producer.php @@ -8,6 +8,7 @@ use GuzzleHttp\Pool; use GuzzleHttp\Psr7\Request; use GuzzleHttp\Psr7\Response; use Psr\Http\Message\ResponseInterface; +use Throwable; use tm\xls\rocketMq\thinkphp\connection\Connection; class Producer @@ -52,7 +53,7 @@ class Producer $index => $response->getBody()->getContents() ]; }, - 'rejected' => function (RequestException $reason, $index) { + 'rejected' => function (Throwable $reason, $index) { //todo 失败 return [ $index => $reason->getMessage()