Skip to content

Commit

Permalink
chore(network): close server on destruct
Browse files Browse the repository at this point in the history
Signed-off-by: azjezz <azjezz@protonmail.com>
  • Loading branch information
azjezz committed Jan 14, 2022
1 parent bbbd319 commit 13ed46c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Psl/Network/Internal/AbstractStreamServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ static function (string $_watcher, mixed $resource) use (&$suspension): void {
// @codeCoverageIgnoreEnd
},
);

Async\Scheduler::disable($this->watcher);
}

Expand Down Expand Up @@ -140,7 +141,6 @@ public function __destruct()
public function close(): void
{
Async\Scheduler::cancel($this->watcher);

if (null === $this->impl) {
return;
}
Expand Down

0 comments on commit 13ed46c

Please sign in to comment.