skaarj1989/mWebSockets

Ping counts need reset on terminate

Closed this issue · 1 comments

m_NumPings needs reset on termination, otherwise any time ping causes disconnect, when you reconnect, the first ping will cause it to disconnect again.

void WebSocket::terminate() {

    //m_Client.flush();

    m_Client.stop();
    m_eReadyState = WSRS_CLOSED;
    m_NumPings = 0; // add this here
}

Hi,

Thanks for info, I am working on this and few more features.