Skip to content

Commit

Permalink
Merge pull request emqx#126 from KonstantinRitt/ssl
Browse files Browse the repository at this point in the history
Ssl related fixes
  • Loading branch information
mwallnoefer authored Jan 18, 2018
2 parents 5f1ebbe + 9d9235c commit 739e963
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/mqtt/qmqtt_ssl_socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,12 @@ QIODevice *QMQTT::SslSocket::ioDevice()

void QMQTT::SslSocket::connectToHost(const QHostAddress& address, quint16 port)
{
Q_UNUSED(address);
Q_UNUSED(port);

qCritical("qmqtt: SSL does not work with host addresses!");
emit _socket->error(QAbstractSocket::ConnectionRefusedError);
_socket->connectToHostEncrypted(address.toString(), port);
}

void QMQTT::SslSocket::connectToHost(const QString& hostName, quint16 port)
{
_socket->connectToHostEncrypted(hostName, port);

if (!_socket->waitForEncrypted())
{
qCritical() << QStringLiteral("qmqtt SSL: ") << _socket->errorString();
}
}

void QMQTT::SslSocket::disconnectFromHost()
Expand Down

0 comments on commit 739e963

Please sign in to comment.