summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2014-01-17 05:40:27 -0800
committerPatrick Ohly <patrick.ohly@intel.com>2014-01-17 16:15:16 +0100
commitc1e894b5e7516297a17930f02c8b2a5b0dc9a80f (patch)
tree17aa727429c05661635fca7e70a8e0a8c8a86029
parentd99c25f20a84bbd3e8cff6082d986ccf923e4b18 (diff)
message resend: be more conservative
When timing out, SyncContext nevertheless sometimes resent a message despite being close to the final timeout deadline. Relax the math further so that more time must remain before the deadline when attempting a resend. The earlier behavior randomly broke some of the resend tests.
-rw-r--r--src/syncevo/SyncContext.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/syncevo/SyncContext.cpp b/src/syncevo/SyncContext.cpp
index a2e2bf4b..c58f0889 100644
--- a/src/syncevo/SyncContext.cpp
+++ b/src/syncevo/SyncContext.cpp
@@ -4168,7 +4168,7 @@ SyncMLStatus SyncContext::doSync()
// (MB #6370).
// Same if() as below for FAILED.
if (m_serverMode ||
- !m_retryInterval || duration + 0.1 >= m_retryDuration || requestNum == 1) {
+ !m_retryInterval || duration + 0.9 >= m_retryDuration || requestNum == 1) {
SE_LOG_INFO(NULL,
"Transport giving up after %d retries and %ld:%02ldmin",
m_retries,
@@ -4242,7 +4242,7 @@ SyncMLStatus SyncContext::doSync()
// we might as well give up now immediately. Include some fuzz factor
// in case we woke up slightly too early.
if (m_serverMode ||
- !m_retryInterval || duration + resendDelay + 0.1 >= m_retryDuration || requestNum == 1) {
+ !m_retryInterval || duration + resendDelay + 0.9 >= m_retryDuration || requestNum == 1) {
SE_LOG_INFO(NULL,
"Transport giving up after %d retries and %ld:%02ldmin",
m_retries,