mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
ServerHandler: do not send pings unless the TLS handshake has completed.
sss123next in mumble-voip/mumble#3294 reports that the current ping timer logic causes problems with slow TLS handshakes, such as when connecting to servers with large DH parameters. This commit ensures pings are not sent before the TLS handshake has completed. This was tested against a Grumble instance built against a modified crypto/tls package that sleeps during the handshake. I verified that isEncrypted() returns false when the handshake has not finished, and returns true when the handshake has completed.
This commit is contained in:
parent
1844f214e1
commit
d1888619f4
@ -461,6 +461,11 @@ void ServerHandler::sendPingInternal() {
|
||||
return;
|
||||
}
|
||||
|
||||
// Ensure the TLS handshake has completed before sending pings.
|
||||
if (!qtsSock->isEncrypted()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (g.s.iMaxInFlightTCPPings >= 0 && iInFlightTCPPings >= g.s.iMaxInFlightTCPPings) {
|
||||
serverConnectionClosed(QAbstractSocket::UnknownSocketError, tr("Server is not responding to TCP pings"));
|
||||
return;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user