cvs: php4 /pear/Net Socket.php
| From: | Chuck Hagenbuch | Date: | Wed, 11 Oct 2000 22:22:19 +0000 |
| Subject: | cvs: php4 /pear/Net Socket.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-2014@lists.php.net to get a copy of this message | ||
chagenbu Wed Oct 11 15:22:19 2000 EDT
Modified files:
/php4/pear/Net Socket.php
Log:
fix a problem with the readLine() method of Net_Socket that occurred when
there was no timeout set.
Index: php4/pear/Net/Socket.php
diff -u php4/pear/Net/Socket.php:1.3 php4/pear/Net/Socket.php:1.4
--- php4/pear/Net/Socket.php:1.3 Sun Aug 20 09:23:44 2000
+++ php4/pear/Net/Socket.php Wed Oct 11 15:22:19 2000
@@ -17,7 +17,7 @@
// | Chuck Hagenbuch <chuck@horde.org> |
// +----------------------------------------------------------------------+
//
-// $Id: Socket.php,v 1.3 2000/08/20 16:23:44 chagenbu Exp $
+// $Id: Socket.php,v 1.4 2000/10/11 22:22:19 chagenbu Exp $
//
require_once 'PEAR.php';
@@ -289,7 +289,7 @@
if (is_resource($this->fp)) {
$line = '';
$timeout = time() + $this->timeout;
- while (!feof($this->fp) && time() < $timeout) {
+ while (!feof($this->fp) && (!$this->timeout || time() < $timeout)) {
$line .= fgets($this->fp, $this->lineLength);
$len = strlen($line);
if ($len >=2 && substr($line, $len-2, 2) == "\r\n")