diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2015-08-24 10:21:48 +0200 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2015-08-24 10:21:48 +0200 |
| commit | 8e7aa0094511dcac15e6c09f3aab91b52ebbd35e (patch) | |
| tree | d34a5f6564b1c31853d86bc2e7ce0bde28051f39 /src/base/QXmppStun.cpp | |
| parent | c8368d4f6d7af251b7462d896fa40814ddf7ff8c (diff) | |
| download | qxmpp-8e7aa0094511dcac15e6c09f3aab91b52ebbd35e.tar.gz | |
QXmppStunTransaction : delay initial message
Diffstat (limited to 'src/base/QXmppStun.cpp')
| -rw-r--r-- | src/base/QXmppStun.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/base/QXmppStun.cpp b/src/base/QXmppStun.cpp index f6dd84c8..7e19231c 100644 --- a/src/base/QXmppStun.cpp +++ b/src/base/QXmppStun.cpp @@ -1095,9 +1095,7 @@ QXmppStunTransaction::QXmppStunTransaction(const QXmppStunMessage &request, QObj this, SLOT(retry())); // send packet immediately - m_tries++; - emit writeStun(m_request); - m_retryTimer->start(STUN_RTO_INTERVAL); + m_retryTimer->start(0); } void QXmppStunTransaction::readStun(const QXmppStunMessage &response) @@ -1134,9 +1132,9 @@ void QXmppStunTransaction::retry() } // resend request - m_tries++; emit writeStun(m_request); - m_retryTimer->start(2 * m_retryTimer->interval()); + m_retryTimer->start(m_tries ? 2 * m_retryTimer->interval() : STUN_RTO_INTERVAL); + m_tries++; } /// Constructs a new QXmppTurnAllocation. |
