handle dupe ping sockets better

This commit is contained in:
Daniel Lugo 2020-11-06 15:46:24 -04:00
parent adb8cead88
commit 2c12884247

View file

@ -439,7 +439,11 @@ module.exports = (
} }
if (pingIntervalID !== null) { if (pingIntervalID !== null) {
logger.error('Tried to set ping socket twice') logger.error(
'Tried to set ping socket twice, this might be due to an app restart and the old socket not being recycled by socket.io in time, will disable the older ping interval, which means the old socket wont work and will ping this new socket instead'
)
clearInterval(pingIntervalID)
pingIntervalID = null
} }
socket.emit('shockping') socket.emit('shockping')