Permalink
Browse files

Avoid setting the socket IO timeout to 0.

Zero apparently means "immediate" and not "infinite".  I'm not sure why I
would have assumed the later.

Bug: 18335
  • Loading branch information...
1 parent 939e8ac commit 2ef7e09b3be0cb351caa7d7379cbbdef0ebfeac3 @jparise jparise committed Apr 15, 2011
Showing with 6 additions and 5 deletions.
  1. +4 −2 SMTP.php
  2. +2 −3 package.xml
View
@@ -417,8 +417,10 @@ function connect($timeout = null, $persistent = false)
* timeout values for the initial connection (our $timeout parameter)
* and all other socket operations.
*/
- if (PEAR::isError($error = $this->setTimeout($this->_timeout))) {
- return $error;
+ if ($this->_timeout > 0) {
+ if (PEAR::isError($error = $this->setTimeout($this->_timeout))) {
+ return $error;
+ }
}
if (PEAR::isError($error = $this->_parseResponse(220))) {
View
@@ -22,16 +22,15 @@
<date>2011-02-06</date>
<time>19:00:00</time>
<version>
- <release>1.5.1</release>
+ <release>1.5.2</release>
<api>1.1.3</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://www.php.net/license/3_01.txt">PHP License</license>
- <notes>- Fixing SASL proxy authentication for DIGEST-MD5. (Bug 17538)
-- Fixing the default socket timeout. (Bug 18335)
+ <notes>- Avoid requesting immediate socket timeouts. (Bug 18335)
</notes>
<contents>
<dir baseinstalldir="Net" name="/">

0 comments on commit 2ef7e09

Please sign in to comment.