diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-05-16 18:28:22 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-05-16 18:28:22 +0200 |
commit | 893c27404516eefc2776e7db4b3f102f89867e09 (patch) | |
tree | 8a0bca71d49a4c468c0c78f59f42b1f42f19a11f /program/lib/Net | |
parent | 52f2a698555dd50f176b58f09396a0a0d9227a04 (diff) |
Fix Net_Socket bug with no timeout (failed connection in managesieve plugin)
Diffstat (limited to 'program/lib/Net')
-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; + } } /** |