summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qdtls.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/ssl/qdtls.cpp')
-rw-r--r--src/network/ssl/qdtls.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/ssl/qdtls.cpp b/src/network/ssl/qdtls.cpp
index 7fc3a486a0..e9c462cd80 100644
--- a/src/network/ssl/qdtls.cpp
+++ b/src/network/ssl/qdtls.cpp
@@ -930,8 +930,8 @@ bool QDtls::resumeHandshake(QUdpSocket *socket)
}
/*!
- Aborts the handshake in case peer verification errors could not be ignored.
- \a socket must be a valid pointer.
+ Aborts the ongoing handshake. Returns true if one was on-going on \a socket;
+ otherwise, sets a suitable error and returns false.
\sa doHandshake(), resumeHandshake()
*/
@@ -944,9 +944,9 @@ bool QDtls::abortHandshake(QUdpSocket *socket)
return false;
}
- if (d->handshakeState != PeerVerificationFailed) {
+ if (d->handshakeState != PeerVerificationFailed && d->handshakeState != HandshakeInProgress) {
d->setDtlsError(QDtlsError::InvalidOperation,
- tr("Not in VerificationError state, nothing to abort"));
+ tr("No handshake in progress, nothing to abort"));
return false;
}