Index: trunk/phase3/includes/memcached-client.php |
— | — | @@ -737,6 +737,11 @@ |
738 | 738 | function _dead_sock ($sock) |
739 | 739 | { |
740 | 740 | $host = array_search($sock, $this->_cache_sock); |
| 741 | + $this->_dead_host($host); |
| 742 | + } |
| 743 | + |
| 744 | + function _dead_host ($host) |
| 745 | + { |
741 | 746 | @list ($ip, /* $port */) = explode(":", $host); |
742 | 747 | $this->_host_dead[$ip] = time() + 30 + intval(rand(0, 10)); |
743 | 748 | $this->_host_dead[$host] = $this->_host_dead[$ip]; |
— | — | @@ -1005,7 +1010,7 @@ |
1006 | 1011 | return null; |
1007 | 1012 | |
1008 | 1013 | if (!$this->_connect_sock($sock, $host)) |
1009 | | - return $this->_dead_sock($host); |
| 1014 | + return $this->_dead_host($host); |
1010 | 1015 | |
1011 | 1016 | // Do not buffer writes |
1012 | 1017 | stream_set_write_buffer($sock, 0); |