diff options
author | Simon Rettberg | 2017-09-02 18:03:15 +0200 |
---|---|---|
committer | Simon Rettberg | 2017-09-02 18:03:15 +0200 |
commit | 9858ab5bbb2fc5d1569257c0ee8f794fdae1c512 (patch) | |
tree | 7bb448cc73f852f5ed0f258daf8c9280755bb52d /src/serverconfig.h | |
parent | [*] Continue splitting #defines to clientconfig.h etc. (diff) | |
download | dnbd3-9858ab5bbb2fc5d1569257c0ee8f794fdae1c512.tar.gz dnbd3-9858ab5bbb2fc5d1569257c0ee8f794fdae1c512.tar.xz dnbd3-9858ab5bbb2fc5d1569257c0ee8f794fdae1c512.zip |
[SERVER] Implement closeUnusedFd config option
This will close the readFd of images that have no active clients
after some idle period (1 hour currently).
Prevents deleted images from taking up space until the server
is shut down.
Diffstat (limited to 'src/serverconfig.h')
-rw-r--r-- | src/serverconfig.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/serverconfig.h b/src/serverconfig.h index ea772b9..e8127c0 100644 --- a/src/serverconfig.h +++ b/src/serverconfig.h @@ -42,5 +42,8 @@ #define RTT_THRESHOLD_FACTOR(us) (((us) * 2) / 3) // 2/3 = current to best must be 33% worse +// How many seconds have to pass after the last client disconnected until the imagefd is closed +#define UNUSED_FD_TIMEOUT 3600 + #endif |