From 783a06a4b47b3e364edc07261469fb56ca52c3ea Mon Sep 17 00:00:00 2001 From: Matthias Krauser Date: Tue, 16 Dec 2014 22:36:45 +0100 Subject: [PATCH 1/2] check return value of stream_select --- src/StreamSelectLoop.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/StreamSelectLoop.php b/src/StreamSelectLoop.php index 7d455048..f9b5590e 100644 --- a/src/StreamSelectLoop.php +++ b/src/StreamSelectLoop.php @@ -218,7 +218,12 @@ private function waitForStreamActivity($timeout) $read = $this->readStreams; $write = $this->writeStreams; - $this->streamSelect($read, $write, $timeout); + $n = $this->streamSelect($read, $write, $timeout); + if (false === $n) { + // if a system call has been interrupted, + // we cannot rely on it's outcome + return; + } foreach ($read as $stream) { $key = (int) $stream; From 45e8e88a5233e8185661c60022cb916e061c7c56 Mon Sep 17 00:00:00 2001 From: Matthias Krauser Date: Thu, 1 Oct 2015 21:58:14 +0200 Subject: [PATCH 2/2] changed variable name --- src/StreamSelectLoop.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/StreamSelectLoop.php b/src/StreamSelectLoop.php index f9b5590e..395f7f8b 100644 --- a/src/StreamSelectLoop.php +++ b/src/StreamSelectLoop.php @@ -218,8 +218,8 @@ private function waitForStreamActivity($timeout) $read = $this->readStreams; $write = $this->writeStreams; - $n = $this->streamSelect($read, $write, $timeout); - if (false === $n) { + $available = $this->streamSelect($read, $write, $timeout); + if (false === $available) { // if a system call has been interrupted, // we cannot rely on it's outcome return; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy