diff options
author | Simon Rettberg | 2019-01-31 10:26:04 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-01-31 10:26:04 +0100 |
commit | 41a9d196062bfea0aadde87bc30ae262890334b7 (patch) | |
tree | 29c34938de13f93b4fb9b4cf7cd5499342079e5b /src/server/altservers.c | |
parent | [SERVER] uplink: Check for _maxPayload when getting client request (diff) | |
download | dnbd3-41a9d196062bfea0aadde87bc30ae262890334b7.tar.gz dnbd3-41a9d196062bfea0aadde87bc30ae262890334b7.tar.xz dnbd3-41a9d196062bfea0aadde87bc30ae262890334b7.zip |
[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.
Diffstat (limited to 'src/server/altservers.c')
-rw-r--r-- | src/server/altservers.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 ) { |