Don't PING unless nothing has been sent
Created by: Tmplt
According to the IRC specification, a PING is only required if nothing has been sent to the server for an unspecified amount of time. In my tests, one minute and 30 seconds has been found to be a good time window for every PING (this might be a server option, though). However, ping()
is called even though messages has been sent to the server, which is superfluous.
The ping()
function should be changed so that the client only PINGs when it is required: when nothing has been sent to the server for one minute and 30 seconds.