martynsmith / node-irc

NodeJS IRC client library
GNU General Public License v3.0
1.33k stars 424 forks source link

fix(ping timeouts): When a ping timeout is detected properly destroy … #452

Closed jirwin closed 8 years ago

jirwin commented 8 years ago

…the existing connection before making a new one.

Previously the connection wasn't being closed properly as the the close event on the socket was just being emitted instead of actually closing the connection. This caused the client to open a new, duplicate connection on reconnect, instead of replacing the existing connection.

jirwin commented 8 years ago

This should fix #449.

Zamiell commented 8 years ago

Not sure this is fixed - when running the latest version of master, my error-0.log was filled with:

CyclingPingTimer 3: server silent for too long, let's send a PING
CyclingPingTimer 0: ping timeout!
CyclingPingTimer 4: server silent for too long, let's send a PING
CyclingPingTimer 1: ping timeout!
CyclingPingTimer 5: server silent for too long, let's send a PING
CyclingPingTimer 2: ping timeout!
CyclingPingTimer 6: server silent for too long, let's send a PING
CyclingPingTimer 3: ping timeout!
CyclingPingTimer 7: server silent for too long, let's send a PING
CyclingPingTimer 4: ping timeout!
CyclingPingTimer 8: server silent for too long, let's send a PING
CyclingPingTimer 5: ping timeout!
CyclingPingTimer 9: server silent for too long, let's send a PING
CyclingPingTimer 6: ping timeout!
CyclingPingTimer 7: ping timeout!
CyclingPingTimer 8: ping timeout!
CyclingPingTimer 10: server silent for too long, let's send a PING
CyclingPingTimer 9: ping timeout!
CyclingPingTimer 10: server silent for too long, let's send a PING
CyclingPingTimer 10: server silent for too long, let's send a PING
CyclingPingTimer 10: server silent for too long, let's send a PING
CyclingPingTimer 10: server silent for too long, let's send a PING
CyclingPingTimer 10: server silent for too long, let's send a PING
CyclingPingTimer 10: server silent for too long, let's send a PING
CyclingPingTimer 10: server silent for too long, let's send a PING
CyclingPingTimer 10: server silent for too long, let's send a PING
CyclingPingTimer 10: server silent for too long, let's send a PING
CyclingPingTimer 10: server silent for too long, let's send a PING
CyclingPingTimer 10: server silent for too long, let's send a PING
CyclingPingTimer 10: server silent for too long, let's send a PING
CyclingPingTimer 10: server silent for too long, let's send a PING
CyclingPingTimer 10: server silent for too long, let's send a PING
CyclingPingTimer 10: server silent for too long, let's send a PING
CyclingPingTimer 10: server silent for too long, let's send a PING
CyclingPingTimer 10: server silent for too long, let's send a PING
CyclingPingTimer 10: server silent for too long, let's send a PING
CyclingPingTimer 10: server silent for too long, let's send a PING
CyclingPingTimer 10: server silent for too long, let's send a PING
CyclingPingTimer 10: server silent for too long, let's send a PING
CyclingPingTimer 10: server silent for too long, let's send a PING
CyclingPingTimer 10: server silent for too long, let's send a PING
Kongzted commented 6 years ago

It just starts pinging after SEND: MODE Anyone with fix yet?