We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7dc3006 commit b2acd81Copy full SHA for b2acd81
src/LibEvLoop.php
@@ -38,6 +38,10 @@ public function __construct()
38
*/
39
public function addReadStream($stream, callable $listener)
40
{
41
+ if (isset($this->readEvents[(int) $stream])) {
42
+ return;
43
+ }
44
+
45
$callback = function () use ($stream, $listener) {
46
call_user_func($listener, $stream, $this);
47
};
@@ -53,6 +57,10 @@ public function addReadStream($stream, callable $listener)
53
57
54
58
public function addWriteStream($stream, callable $listener)
55
59
60
+ if (isset($this->writeEvents[(int) $stream])) {
61
62
63
56
64
65
66
0 commit comments