summaryrefslogtreecommitdiff
path: root/program/lib/Net
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-05-16 18:28:22 +0200
committerAleksander Machniak <alec@alec.pl>2013-05-16 18:28:22 +0200
commit893c27404516eefc2776e7db4b3f102f89867e09 (patch)
tree8a0bca71d49a4c468c0c78f59f42b1f42f19a11f /program/lib/Net
parent52f2a698555dd50f176b58f09396a0a0d9227a04 (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.php7
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;
+ }
}
/**