File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -35,25 +35,24 @@ public function addWriteStream($stream, $listener)
35
35
36
36
public function removeReadStream ($ stream )
37
37
{
38
- $ this ->readEvents [(int )$ stream ]->stop ();
39
- unset($ this ->readEvents [(int )$ stream ]);
38
+ if (isset ($ this ->readEvents [(int )$ stream ])) {
39
+ $ this ->readEvents [(int )$ stream ]->stop ();
40
+ unset($ this ->readEvents [(int )$ stream ]);
41
+ }
40
42
}
41
43
42
44
public function removeWriteStream ($ stream )
43
45
{
44
- $ this ->writeEvents [(int )$ stream ]->stop ();
45
- unset($ this ->writeEvents [(int )$ stream ]);
46
+ if (isset ($ this ->writeEvents [(int )$ stream ])) {
47
+ $ this ->writeEvents [(int )$ stream ]->stop ();
48
+ unset($ this ->writeEvents [(int )$ stream ]);
49
+ }
46
50
}
47
51
48
52
public function removeStream ($ stream )
49
53
{
50
- if (isset ($ this ->readEvents [(int )$ stream ])) {
51
- $ this ->removeReadStream ($ stream );
52
- }
53
-
54
- if (isset ($ this ->writeEvents [(int )$ stream ])) {
55
- $ this ->removeWriteStream ($ stream );
56
- }
54
+ $ this ->removeReadStream ($ stream );
55
+ $ this ->removeWriteStream ($ stream );
57
56
}
58
57
59
58
private function addStream ($ stream , $ listener , $ flags )
You can’t perform that action at this time.
0 commit comments