diff options
author | Simon Rettberg | 2019-08-05 13:42:19 +0200 |
---|---|---|
committer | Simon Rettberg | 2019-08-05 13:42:19 +0200 |
commit | 1a8a31603e56995639eba99492611ab4e7ef64af (patch) | |
tree | 72e9c3a2fb7f8e44aba7cc5a333f9ae7d19da0d6 /src/server/uplink.c | |
parent | [SERVER] Add sanity check to threadpool_run for NULL routine (diff) | |
download | dnbd3-1a8a31603e56995639eba99492611ab4e7ef64af.tar.gz dnbd3-1a8a31603e56995639eba99492611ab4e7ef64af.tar.xz dnbd3-1a8a31603e56995639eba99492611ab4e7ef64af.zip |
[SERVER] Allow uplink shutdown if bgrMinClients > image->users
Diffstat (limited to 'src/server/uplink.c')
-rw-r--r-- | src/server/uplink.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/uplink.c b/src/server/uplink.c index 682b986..aa5228c 100644 --- a/src/server/uplink.c +++ b/src/server/uplink.c @@ -1082,6 +1082,7 @@ static bool uplink_saveCacheMap(dnbd3_connection_t *link) static bool uplink_connectionShouldShutdown(dnbd3_connection_t *link) { - return ( link->idleTime > SERVER_UPLINK_IDLE_TIMEOUT && _backgroundReplication != BGR_FULL ); + return ( link->idleTime > SERVER_UPLINK_IDLE_TIMEOUT + && ( _backgroundReplication != BGR_FULL || _bgrMinClients > link->image->users ) ); } |