skaarj1989 / mWebSockets

WebSockets for microcontrollers
https://skaarj1989.github.io/mWebSockets/autobahn-testsuite/servers/
MIT License
108 stars 23 forks source link

Ping counts need reset on terminate #9

Closed pangus45 closed 5 years ago

pangus45 commented 5 years ago

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
}
skaarj1989 commented 5 years ago

Hi,

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