diff options
Diffstat (limited to 'program')
-rw-r--r-- | program/lib/Net/Socket.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/program/lib/Net/Socket.php b/program/lib/Net/Socket.php index e8a22d014..669700c1d 100644 --- a/program/lib/Net/Socket.php +++ b/program/lib/Net/Socket.php @@ -267,7 +267,12 @@ class Net_Socket extends PEAR $this->timeout = $seconds + $microseconds/1000000; } - return stream_set_timeout($this->fp, (int) $seconds, (int) $microseconds); + if ($this->timeout > 0) { + return stream_set_timeout($this->fp, (int) $seconds, (int) $microseconds); + } + else { + return false; + } } /** |