diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2015-08-24 16:45:14 +0200 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2015-08-24 17:12:21 +0200 |
| commit | 5901b49b3f6b8d6f7d09678e34226a7f06311482 (patch) | |
| tree | 304498131112d07a6d684ad7c744e576aea4abb6 | |
| parent | 5a6727b9c2600f334527ff7126202cf1f8685333 (diff) | |
| download | qxmpp-5901b49b3f6b8d6f7d09678e34226a7f06311482.tar.gz | |
don't send triggered check if one is in progress
| -rw-r--r-- | src/base/QXmppStun.cpp | 6 | ||||
| -rw-r--r-- | tests/qxmppiceconnection/tst_qxmppiceconnection.cpp | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/base/QXmppStun.cpp b/src/base/QXmppStun.cpp index 987e040f..cd51b46f 100644 --- a/src/base/QXmppStun.cpp +++ b/src/base/QXmppStun.cpp @@ -2204,7 +2204,9 @@ void QXmppIceComponent::handleDatagram(const QByteArray &buffer, const QHostAddr pair->checked |= QIODevice::ReadOnly; } - if (!d->iceControlling && pair->state() != CandidatePair::SucceededState && !d->remoteUser.isEmpty()) + if (!d->remoteUser.isEmpty() + && pair->state() != CandidatePair::InProgressState + && pair->state() != CandidatePair::SucceededState) { // send a triggered connectivity test QXmppStunMessage message; @@ -2213,8 +2215,6 @@ void QXmppIceComponent::handleDatagram(const QByteArray &buffer, const QHostAddr message.setPriority(d->peerReflexivePriority); message.setUsername(QString("%1:%2").arg(d->remoteUser, d->localUser)); message.iceControlled = d->tieBreaker; - if (pair->transaction) - pair->transaction->deleteLater(); pair->setState(CandidatePair::InProgressState); pair->transaction = new QXmppStunTransaction(message, this); } diff --git a/tests/qxmppiceconnection/tst_qxmppiceconnection.cpp b/tests/qxmppiceconnection/tst_qxmppiceconnection.cpp index 86b9dd3e..50218d02 100644 --- a/tests/qxmppiceconnection/tst_qxmppiceconnection.cpp +++ b/tests/qxmppiceconnection/tst_qxmppiceconnection.cpp @@ -75,8 +75,8 @@ void tst_QXmppIceConnection::testConnect() // clientR completes first loop.exec(); - QVERIFY(clientL.isConnected()); - QVERIFY(!clientR.isConnected()); + QVERIFY(!clientL.isConnected()); + QVERIFY(clientR.isConnected()); // clientL completes second loop.exec(); |
