From 7e7238708f29f39df643aba25485ba1c075943c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=93=AD=E6=98=95?= <715557344@qq.com> Date: Sat, 30 Sep 2023 22:57:09 +0800 Subject: [PATCH] Update SafeSocket.php --- src/SafeSocket.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/SafeSocket.php b/src/SafeSocket.php index 0c99bde..55ec60d 100644 --- a/src/SafeSocket.php +++ b/src/SafeSocket.php @@ -25,10 +25,12 @@ class SafeSocket implements SocketInterface protected bool $loop = false; - protected ?LoggerInterface $logger = null; - - public function __construct(protected Socket $socket, int $capacity = 65535, protected bool $throw = true) - { + public function __construct( + protected Socket $socket, + int $capacity = 65535, + protected bool $throw = true, + protected ?LoggerInterface $logger = null + ) { $this->channel = new Channel($capacity); }