Index: trunk/phase3/includes/memcached-client.php |
— | — | @@ -262,7 +262,7 @@ |
263 | 263 | $this->_timeout_microseconds = 0; |
264 | 264 | |
265 | 265 | $this->_connect_timeout = 0.01; |
266 | | - $this->_connect_attempts = 3; |
| 266 | + $this->_connect_attempts = 2; |
267 | 267 | } |
268 | 268 | |
269 | 269 | // }}} |
— | — | @@ -704,15 +704,6 @@ |
705 | 705 | $timeout = $this->_connect_timeout; |
706 | 706 | $errno = $errstr = null; |
707 | 707 | for ($i = 0; !$sock && $i < $this->_connect_attempts; $i++) { |
708 | | - if ($i > 0) { |
709 | | - # Sleep until the timeout, in case it failed fast |
710 | | - $elapsed = microtime(true) - $t; |
711 | | - if ( $elapsed < $timeout ) { |
712 | | - usleep(($timeout - $elapsed) * 1e6); |
713 | | - } |
714 | | - $timeout *= 2; |
715 | | - } |
716 | | - $t = microtime(true); |
717 | 708 | if ($this->_persistant == 1) |
718 | 709 | { |
719 | 710 | $sock = @pfsockopen($ip, $port, $errno, $errstr, $timeout); |