u
This commit is contained in:
parent
c81ae8bc42
commit
e0e2c154b6
@ -13,7 +13,7 @@ module.exports = {
|
||||
console.info('Base Socket Server is initialized.')
|
||||
|
||||
my.wsServer.on('connection', (socket, req) => {
|
||||
console.info(`A socket is connecting from ${req.connection.remoteAddress}:${req.connection.remotePort}.`)
|
||||
//console.info(`A socket is connecting from ${req.connection.remoteAddress}:${req.connection.remotePort}.`)
|
||||
|
||||
// socket.isAlive = true
|
||||
// socket.on('pong', function() { console.log('👈 ASS: on Pong'); this.isAlive = true })
|
||||
@ -60,7 +60,7 @@ module.exports = {
|
||||
// }, 60000)
|
||||
|
||||
socket.on('close', () => {
|
||||
console.log('Closing socket of usid =', socket?.usid)
|
||||
//console.log('Closing socket of usid =', socket?.usid) // don't know why, but this output happens too often without usid.
|
||||
delete my.socketPool[socket?.usid]
|
||||
// clearInterval(heartbeat)
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user