Skip to content

Commit 14964ed

Browse files
committed
optimization
1 parent 50d4c32 commit 14964ed

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Events/Select.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,10 @@ public function loop()
267267

268268
if ($read || $write || $except) {
269269
// Waiting read/write/signal/timeout events.
270-
set_error_handler(function(){});
271-
$ret = stream_select($read, $write, $except, 0, $this->_selectTimeout);
272-
restore_error_handler();
270+
try {
271+
$ret = @stream_select($read, $write, $except, 0, $this->_selectTimeout);
272+
} catch (\Exception $e) {} catch (\Error $e) {}
273+
273274
} else {
274275
usleep($this->_selectTimeout);
275276
$ret = false;

0 commit comments

Comments
 (0)