diff --git a/src/Psl/IO/Internal/ResourceHandle.php b/src/Psl/IO/Internal/ResourceHandle.php index 78bdd397..23a186fd 100644 --- a/src/Psl/IO/Internal/ResourceHandle.php +++ b/src/Psl/IO/Internal/ResourceHandle.php @@ -169,11 +169,7 @@ static function () use (&$deferred) { public function writeImmediately(string $bytes): int { // there's a pending write operation, wait for it first. - $this->writeDeferred - ?->getAwaitable() - ->then(static fn() => null, static fn() => null) - ->ignore() - ->await(); + $this->writeDeferred?->getAwaitable()->then(static fn() => null, static fn() => null)->await(); if (!is_resource($this->stream)) { throw new Exception\AlreadyClosedException('Handle has already been closed.'); @@ -277,12 +273,7 @@ static function () use (&$deferred) { public function readImmediately(?int $max_bytes = null): string { // there's a pending read operation, wait for it. - $this->readDeferred - ?->getAwaitable() - ->then(static fn() => null, static fn() => null) - ->ignore() - ->await() - ; + $this->readDeferred?->getAwaitable()->then(static fn() => null, static fn() => null)->await(); if (!is_resource($this->stream)) { throw new Exception\AlreadyClosedException('Handle has already been closed.'); diff --git a/src/Psl/TCP/Server.php b/src/Psl/TCP/Server.php index b45be02e..93f28eec 100644 --- a/src/Psl/TCP/Server.php +++ b/src/Psl/TCP/Server.php @@ -99,11 +99,7 @@ public static function create( */ public function nextConnection(): SocketInterface { - $this->deferred - ?->getAwaitable() - ->then(static fn() => null, static fn() => null) - ->ignore() - ->await(); + $this->deferred?->getAwaitable()->then(static fn() => null, static fn() => null)->await(); if (null === $this->impl) { throw new Network\Exception\AlreadyStoppedException('Server socket has already been stopped.'); diff --git a/src/Psl/Unix/Server.php b/src/Psl/Unix/Server.php index 27aaa70a..3e4a10ed 100644 --- a/src/Psl/Unix/Server.php +++ b/src/Psl/Unix/Server.php @@ -90,11 +90,7 @@ public static function create(string $file): self */ public function nextConnection(): SocketInterface { - $this->deferred - ?->getAwaitable() - ->then(static fn() => null, static fn() => null) - ->ignore() - ->await(); + $this->deferred?->getAwaitable()->then(static fn() => null, static fn() => null)->await(); if (null === $this->impl) { throw new Network\Exception\AlreadyStoppedException('Server socket has already been stopped.');