mirror of
https://github.com/danog/amp.git
synced 2024-12-02 09:27:46 +01:00
Ignore only warnings for interrupted syscalls in NativeDriver
Fixes #160.
This commit is contained in:
parent
96e23e2246
commit
a247757535
@ -143,10 +143,20 @@ 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)) {
|
||||
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) {
|
||||
$streamId = (int) $stream;
|
||||
if (!isset($this->readWatchers[$streamId])) {
|
||||
|
Loading…
Reference in New Issue
Block a user