From 41a9d196062bfea0aadde87bc30ae262890334b7 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 31 Jan 2019 10:26:04 +0100 Subject: [SERVER] Don't keep an uplink connection established forever In case we don't use background replication a connection to an uplink server can potentially stay around forever. This in turn would prevent the uplink server from freeing the image as it appears to be in use. --- src/server/altservers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/server/altservers.c') diff --git a/src/server/altservers.c b/src/server/altservers.c index 0054f53..fe4624f 100644 --- a/src/server/altservers.c +++ b/src/server/altservers.c @@ -380,7 +380,7 @@ void altservers_serverFailed(const dnbd3_host_t * const host) // to prevent the counter from increasing rapidly if many images use the // same uplink. If there's a network hickup, all uplinks will call this // function and would increase the counter too quickly, disabling the server. - if ( foundIndex != -1 && timing_diff( &altServers[foundIndex].lastFail, &now ) > SERVER_RTT_DELAY_INIT ) { + if ( foundIndex != -1 && timing_diff( &altServers[foundIndex].lastFail, &now ) > SERVER_RTT_INTERVAL_INIT ) { altServers[foundIndex].numFails += SERVER_UPLINK_FAIL_INCREASE; altServers[foundIndex].lastFail = now; if ( lastOk != -1 ) { -- cgit v1.2.3-55-g7522