Browse Source

fix: increase faux offline message timeout

Should make problem with duplicated messages less common.
Related to #2726.
pull/3040/head
Zetok Zalbavar 9 years ago
parent
commit
76d8e19320
No known key found for this signature in database
GPG Key ID: C953D3880212068A
  1. 2
      src/persistence/offlinemsgengine.cpp
  2. 4
      src/persistence/offlinemsgengine.h

2
src/persistence/offlinemsgengine.cpp

@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
#include <QMutexLocker>
#include <QTimer>
const int OfflineMsgEngine::offlineTimeout = 2000;
const int OfflineMsgEngine::offlineTimeout = 20000;
QMutex OfflineMsgEngine::globalMutex;
OfflineMsgEngine::OfflineMsgEngine(Friend *frnd) :

4
src/persistence/offlinemsgengine.h

@ -57,6 +57,10 @@ private: @@ -57,6 +57,10 @@ private:
QHash<int, int64_t> receipts;
QMap<int64_t, MsgPtr> undeliveredMsgs;
// timeout after which faux offline messages get to be re-sent
// originally was 2s, but since that was causing lots of duplicated
// messages on receiving end, make qTox be more lazy about re-sending
// should be 20s
static const int offlineTimeout;
};

Loading…
Cancel
Save