diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/net/sslserver.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/net/sslserver.cpp b/src/server/net/sslserver.cpp index 62fe3da..d968834 100644 --- a/src/server/net/sslserver.cpp +++ b/src/server/net/sslserver.cpp @@ -26,7 +26,7 @@ SslServer::SslServer() : QTcpServer(nullptr), _timer(new QTimer(this)) connect(_timer, &QTimer::timeout, [=]() { if (_pending.empty()) return; - const qint64 deadline = QDateTime::currentSecsSinceEpoch() - 10; + const qint64 deadline = QDateTime::currentMSecsSinceEpoch() - 10000; QMutableHashIterator<QSslSocket*, qint64> it(_pending); while (it.hasNext()) { // Remove lingering connections after 10s it.next(); @@ -71,7 +71,7 @@ void SslServer::incomingConnection(qintptr socketDescriptor) serverSocket->setPeerVerifyMode(QSslSocket::VerifyNone); serverSocket->setProtocol(QSsl::SecureProtocols); if (serverSocket->setSocketDescriptor(socketDescriptor)) { - _pending.insert(serverSocket, QDateTime::currentSecsSinceEpoch()); + _pending.insert(serverSocket, QDateTime::currentMSecsSinceEpoch()); // Once the connection is successfully encrypted, raise our newConnection event connect(serverSocket, &QSslSocket::encrypted, [=]() { serverSocket->disconnect(this); |