QSslSocket (OpenSSL): use QMutexLocker
... instead of naked QMutex::(un)lock(). Change-Id: I9927e60286231bfc254d99cc88c39301b31df336 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>bb10
parent
6f7a5b0ecf
commit
8049e9b3b9
|
|
@ -1040,7 +1040,7 @@ bool QSslSocketBackendPrivate::startHandshake()
|
|||
|
||||
// Check if the connection has been established. Get all errors from the
|
||||
// verification stage.
|
||||
_q_sslErrorList()->mutex.lock();
|
||||
QMutexLocker locker(&_q_sslErrorList()->mutex);
|
||||
_q_sslErrorList()->errors.clear();
|
||||
int result = (mode == QSslSocket::SslClientMode) ? q_SSL_connect(ssl) : q_SSL_accept(ssl);
|
||||
|
||||
|
|
@ -1056,7 +1056,7 @@ bool QSslSocketBackendPrivate::startHandshake()
|
|||
}
|
||||
|
||||
errorList << lastErrors;
|
||||
_q_sslErrorList()->mutex.unlock();
|
||||
locker.unlock();
|
||||
|
||||
// Connection aborted during handshake phase.
|
||||
if (q->state() != QAbstractSocket::ConnectedState)
|
||||
|
|
|
|||
Loading…
Reference in New Issue