dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4b7852
)
fix blacklist of dead servers
author
Domas Mituzas
<midom@users.mediawiki.org>
Tue, 27 Oct 2009 07:26:43 +0000
(07:26 +0000)
committer
Domas Mituzas
<midom@users.mediawiki.org>
Tue, 27 Oct 2009 07:26:43 +0000
(07:26 +0000)
includes/memcached-client.php
patch
|
blob
|
history
diff --git
a/includes/memcached-client.php
b/includes/memcached-client.php
index
eb5478e
..
3367c61
100644
(file)
--- a/
includes/memcached-client.php
+++ b/
includes/memcached-client.php
@@
-737,6
+737,11
@@
class memcached
function _dead_sock ($sock)
{
$host = array_search($sock, $this->_cache_sock);
+ $this->_dead_host($host);
+ }
+
+ function _dead_host ($host)
+ {
@list ($ip, /* $port */) = explode(":", $host);
$this->_host_dead[$ip] = time() + 30 + intval(rand(0, 10));
$this->_host_dead[$host] = $this->_host_dead[$ip];
@@
-1005,7
+1010,7
@@
class memcached
return null;
if (!$this->_connect_sock($sock, $host))
- return $this->_dead_
sock
($host);
+ return $this->_dead_
host
($host);
// Do not buffer writes
stream_set_write_buffer($sock, 0);