diff options
author | Simon Rettberg | 2018-09-28 14:40:48 +0200 |
---|---|---|
committer | Simon Rettberg | 2018-09-28 14:40:48 +0200 |
commit | 765834bc2ccbb574217c483d1d3bf23c1ae3d550 (patch) | |
tree | f0e2f793122c49693217cb71763e2e894abc2621 | |
parent | [client] Remove left over test code :/ (diff) | |
download | pvs2-765834bc2ccbb574217c483d1d3bf23c1ae3d550.tar.gz pvs2-765834bc2ccbb574217c483d1d3bf23c1ae3d550.tar.xz pvs2-765834bc2ccbb574217c483d1d3bf23c1ae3d550.zip |
[server] Use MSecs not Secs so we don't require Qt 5.8+
-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); |