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