Skip to content

Commit bf3ef5d

Browse files
committed
Just wait when starting
1 parent 856a930 commit bf3ef5d

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lib/Loop.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ protected function reportPause(float $timeout): void
6767
*/
6868
public function start(): bool
6969
{
70-
if ($this->shutdownDeferred) {
70+
while ($this->shutdownDeferred !== null) {
7171
$this->shutdownDeferred->getFuture()->await();
7272
}
7373
if ($this->running) {
@@ -112,7 +112,6 @@ public function stop(): bool
112112
// @codeCoverageIgnoreEnd
113113
}
114114
$this->shutdownDeferred = new DeferredFuture;
115-
$this->shutdownDeferred->getFuture()->await();
116115
}
117116
return true;
118117
}

0 commit comments

Comments
 (0)