summaryrefslogtreecommitdiffstats
path: root/src/server/globals.h
diff options
context:
space:
mode:
authorSimon Rettberg2019-01-31 10:26:04 +0100
committerSimon Rettberg2019-01-31 10:26:04 +0100
commit41a9d196062bfea0aadde87bc30ae262890334b7 (patch)
tree29c34938de13f93b4fb9b4cf7cd5499342079e5b /src/server/globals.h
parent[SERVER] uplink: Check for _maxPayload when getting client request (diff)
downloaddnbd3-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/globals.h')
-rw-r--r--src/server/globals.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/globals.h b/src/server/globals.h
index 097df83..2b30bc2 100644
--- a/src/server/globals.h
+++ b/src/server/globals.h
@@ -72,7 +72,7 @@ struct _dnbd3_connection
uint64_t replicationHandle; // Handle of pending replication request
atomic_uint_fast64_t bytesReceived; // Number of bytes received by the uplink since startup.
int queueLen; // length of queue
- int idleCount; // How many iterations of keepalive check connection was idle
+ uint32_t idleTime; // How many seconds the uplink was idle (apart from keep-alives)
dnbd3_queued_request_t queue[SERVER_MAX_UPLINK_QUEUE];
};