We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9084c50 commit a021e54Copy full SHA for a021e54
src/server.js
@@ -89,12 +89,12 @@ class Server extends EventEmitter {
89
this.emit('connect', player)
90
}
91
92
- onCloseConnection = (inetAddr, reason) => {
93
- this.conLog('Connection closed: ', inetAddr?.address, reason)
+ onCloseConnection = (conn, reason) => {
+ this.conLog('Connection closed: ', conn?.address, reason)
94
95
- delete this.clients[inetAddr]?.connection // Prevent close loop
96
- this.clients[inetAddr?.address ?? inetAddr]?.close()
97
- delete this.clients[inetAddr?.address]
+ delete this.clients[conn]?.connection // Prevent close loop
+ this.clients[conn?.address ?? conn]?.close()
+ delete this.clients[conn?.address]
98
this.clientCount--
99
100
0 commit comments