Skip to content

Commit eaa974d

Browse files
committed
uncomment lines concerning heartbeat
1 parent e95f1f9 commit eaa974d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/player_server.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ class PlayerServer {
7373
player_socket_clients[index] = ws
7474
controller.model.setPlayerConnection(json_player.id, true)
7575
if (json_player.set_heartbeat != undefined && json_player.set_heartbeat){
76-
//const id = json_player.id
77-
//setTimeout(() => {player_server.sendPing(id)}, 4000)
76+
const id = json_player.id
77+
setTimeout(() => {player_server.sendPing(id)}, 4000)
7878
}
7979
console.log('-> Reconnection of the player of id '+json_player.id);
8080
}
@@ -85,8 +85,8 @@ class PlayerServer {
8585
controller.model.insertPlayer(json_player.id)
8686
controller.model.setPlayerConnection(json_player.id, true)
8787
if (json_player.set_heartbeat != undefined && json_player.set_heartbeat){
88-
//const id = json_player.id
89-
//setTimeout(() => {player_server.sendPing(id)}, 4000)
88+
const id = json_player.id
89+
setTimeout(() => {player_server.sendPing(id)}, 4000)
9090
}
9191
console.log('-> New connection of the player of id '+json_player.id);
9292
}

0 commit comments

Comments
 (0)