handle dupe ping sockets better
This commit is contained in:
parent
adb8cead88
commit
2c12884247
1 changed files with 5 additions and 1 deletions
|
|
@ -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')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue