File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -73,8 +73,8 @@ class PlayerServer {
73
73
player_socket_clients [ index ] = ws
74
74
controller . model . setPlayerConnection ( json_player . id , true )
75
75
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 )
78
78
}
79
79
console . log ( '-> Reconnection of the player of id ' + json_player . id ) ;
80
80
}
@@ -85,8 +85,8 @@ class PlayerServer {
85
85
controller . model . insertPlayer ( json_player . id )
86
86
controller . model . setPlayerConnection ( json_player . id , true )
87
87
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 )
90
90
}
91
91
console . log ( '-> New connection of the player of id ' + json_player . id ) ;
92
92
}
You can’t perform that action at this time.
0 commit comments