Automatic Pings do not seem to respect connecting and error states
#2,627 创建于 2016年11月7日
描述
As per https://github.com/mumble-voip/mumble/pull/2622#issuecomment-258711918
I had Mumble open in a VM, trying to connect to an IP that no longer hosted a server. I got the usual errors for a while. I don't remember what it was: unable to connect?
Then, after 5-6 of them, I began getting "unable to send TCP pings to the server". I guess we start pinging before we should?
ServerHandler::run() sets up the recurring ping timer and immediately starts it. It does so after setting up the socket and initiating the connect (qtsSock->connectToHostEncrypted(qsHostName, usPort)), but without any adequate handling of no-success cases. The timer is local to the run() function; it is never paused on connection issues. So yes, we do start pinging and continue to ping in inadequate cases, namely before a server connection has been established.
Not sure where the (old) reconnect code is though, where the server automatically reconnects.