mirror of
https://github.com/danog/amp.git
synced 2024-11-30 04:29:08 +01:00
Ignore only warnings for interrupted syscalls in NativeDriver
Fixes #160.
This commit is contained in:
parent
96e23e2246
commit
a247757535
@ -143,8 +143,18 @@ class NativeDriver extends Driver {
|
||||
$except = null;
|
||||
|
||||
// Error reporting suppressed since stream_select() emits an E_WARNING if it is interrupted by a signal.
|
||||
if (!@\stream_select($read, $write, $except, $seconds, $microseconds)) {
|
||||
return;
|
||||
if (!($result = @\stream_select($read, $write, $except, $seconds, $microseconds))) {
|
||||
if ($result === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
$error = \error_get_last();
|
||||
|
||||
if (\strpos($error["message"], "unable to select") !== 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->error(new \Exception($error["message"]));
|
||||
}
|
||||
|
||||
foreach ($read as $stream) {
|
||||
|
Loading…
Reference in New Issue
Block a user