Skip to content

Commit a021e54

Browse files
Changed misname in onCloseConnection
1 parent 9084c50 commit a021e54

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/server.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ class Server extends EventEmitter {
8989
this.emit('connect', player)
9090
}
9191

92-
onCloseConnection = (inetAddr, reason) => {
93-
this.conLog('Connection closed: ', inetAddr?.address, reason)
92+
onCloseConnection = (conn, reason) => {
93+
this.conLog('Connection closed: ', conn?.address, reason)
9494

95-
delete this.clients[inetAddr]?.connection // Prevent close loop
96-
this.clients[inetAddr?.address ?? inetAddr]?.close()
97-
delete this.clients[inetAddr?.address]
95+
delete this.clients[conn]?.connection // Prevent close loop
96+
this.clients[conn?.address ?? conn]?.close()
97+
delete this.clients[conn?.address]
9898
this.clientCount--
9999
}
100100

0 commit comments

Comments
 (0)