diff --git a/game/game.js b/game/game.js index a5661e537..5aabb7c08 100755 --- a/game/game.js +++ b/game/game.js @@ -11149,6 +11149,10 @@ } }, onmessage:function(messageevent){ + if(messageevent.data=='heartbeat'){ + this.send('heartbeat'); + return; + } var message; try{ message=JSON.parse(messageevent.data); diff --git a/game/server.js b/game/server.js index 7f0a46e0f..dba90887f 100644 --- a/game/server.js +++ b/game/server.js @@ -45,10 +45,11 @@ if(clients[id]&&clients[id].owner==this){ clients[id].close(); } - } + }, }; var util={ sendl:function(){ + if(this.closed) return; var args=[]; for(var i=0;i