From 7a0322d8b3209013ca317283b3878b3ce94d0a1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Mon, 14 Feb 2022 14:46:41 +0800 Subject: [PATCH] modify plugin name --- Coroutine/Http.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Coroutine/Http.php b/Coroutine/Http.php index c68d55e..94437b8 100644 --- a/Coroutine/Http.php +++ b/Coroutine/Http.php @@ -164,16 +164,14 @@ class Http extends Component } } - if ($response->isWritable()) { - while (($data = $response->recv()) instanceof Frame) { - try { - if ($data->opcode == WEBSOCKET_OPCODE_PING || $data->opcode == WEBSOCKET_OPCODE_PONG) { - continue; - } - call_user_func($message, $data); - } catch (\Throwable $throwable) { - $this->logger()->error($throwable->getMessage()); + while (($data = $response->recv()) instanceof Frame) { + try { + if ($data->opcode == WEBSOCKET_OPCODE_PING || $data->opcode == WEBSOCKET_OPCODE_PONG) { + continue; } + call_user_func($message, $data); + } catch (\Throwable $throwable) { + $this->logger()->error($throwable->getMessage()); } } call_user_func($close, $response->fd);