all repos — wp-ffpc @ 4e647efb2ccfbcd19c9f60f6e73fc18116d1df86

Since Memcached stats aren't available on many implementations, let's
check health by doing a set instead.
Ameir Abdeldayem ameir.abdeldayem@teamaol.com
Mon, 08 Dec 2014 03:35:23 -0500
commit

4e647efb2ccfbcd19c9f60f6e73fc18116d1df86

parent

42743def8d29b7aff978c433a583e422e29a6125

1 files changed, 5 insertions(+), 5 deletions(-)

jump to
M wp-ffpc-backend.phpwp-ffpc-backend.php

@@ -728,14 +728,14 @@ */

private function memcached_status () { /* server status will be calculated by getting server stats */ $this->log ( __translate__("checking server statuses", $this->plugin_constant )); - /* get servers statistic from connection */ - $report = $this->connection->getStats(); + /* get server list from connection */ + $servers = $this->connection->getServerList(); - foreach ( $report as $server_id => $details ) { + foreach ( $servers as $server ) { + $server_id = $server['host'] . self::port_separator . $server['port']; /* reset server status to offline */ $this->status[$server_id] = 0; - /* if server uptime is not empty, it's most probably up & running */ - if ( !empty($details['uptime']) ) { + if ($this->connection->set($this->plugin_constant, time())) { $this->log ( sprintf( __translate__( '%s server is up & running', $this->plugin_constant ), $server_id ) ); $this->status[$server_id] = 1; }