diff options
author | thexai <58434170+thexai@users.noreply.github.com> | 2023-03-02 20:22:12 +0100 |
---|---|---|
committer | thexai <58434170+thexai@users.noreply.github.com> | 2023-03-05 17:09:34 +0100 |
commit | 129d2c94887d3ad0c913621df201c17c92734381 (patch) | |
tree | b1fcf81454a3967d7bd3025f3ac495fd12147725 | |
parent | 36ff01057a2139132aea80fe668f15711ca9ba48 (diff) | |
download | xbmc-129d2c94887d3ad0c913621df201c17c92734381.tar.xz |
NFSFile: adapt timeouts for compatibility with NFSv4
-rw-r--r-- | xbmc/filesystem/NFSFile.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/xbmc/filesystem/NFSFile.cpp b/xbmc/filesystem/NFSFile.cpp index e7179c1100..c32e79ff5d 100644 --- a/xbmc/filesystem/NFSFile.cpp +++ b/xbmc/filesystem/NFSFile.cpp @@ -45,16 +45,16 @@ using namespace std::chrono_literals; namespace { +// Default "lease_time" on most Linux NFSv4 servers are 90s. +// See: https://linux-nfs.org/wiki/index.php/NFS_lock_recovery_notes +// Keep alive interval should be always less than lease_time to avoid client session expires -constexpr auto CONTEXT_TIMEOUT = 6min; - -constexpr auto KEEP_ALIVE_TIMEOUT = 3min; - -constexpr auto IDLE_TIMEOUT = 3min; +constexpr auto CONTEXT_TIMEOUT = 60s; // 2/3 parts of lease_time +constexpr auto KEEP_ALIVE_TIMEOUT = 45s; // half of lease_time +constexpr auto IDLE_TIMEOUT = 30s; // close fast unused contexts when no active connections constexpr auto SETTING_NFS_VERSION = "nfs.version"; - -} // namespace +} // unnamed namespace CNfsConnection::CNfsConnection() : m_pNfsContext(NULL), |