Skip to content

Commit 8eeb5c0

Browse files
committed
[EventLoop] Stop loop before throwing exception (removing stream is not enough)
1 parent 860a98e commit 8eeb5c0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

LibEventLoop.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ protected function createLibeventCallback()
5252
}
5353
}
5454
} catch (\Exception $ex) {
55-
// If one of the callbacks throws an exception we must remove the stream
55+
// If one of the callbacks throws an exception we must stop the loop
5656
// otherwise libevent will swallow the exception and go berserk.
57-
$loop->removeStream($stream);
57+
$loop->stop();
5858

5959
throw $ex;
6060
}

0 commit comments

Comments
 (0)