The comment says:
/* Try the dead server, every 5 seconds */
but the code looks to try for each request more than 5 seconds after the dead
server was first noticed.
If I'm correct, does the following (untested) patch make sense?
Index: memcache/apr_memcache.c
===================================================================
--- memcache/apr_memcache.c (revision 1389910)
+++ memcache/apr_memcache.c (working copy)
@@ -183,8 +183,8 @@
#endif
/* Try the dead server, every 5 seconds */
if (curtime - ms->btime > apr_time_from_sec(5)) {
+ ms->btime = curtime;
if (mc_version_ping(ms) == APR_SUCCESS) {
- ms->btime = curtime;
make_server_live(mc, ms);
#if APR_HAS_THREADS
apr_thread_mutex_unlock(ms->lock);n