Commit 426c535e authored by mercury233's avatar mercury233

fix

parent e0e00f4e
...@@ -609,8 +609,7 @@ ygopro.stoc_follow 'SELECT_TP', false, (buffer, info, client, server)-> ...@@ -609,8 +609,7 @@ ygopro.stoc_follow 'SELECT_TP', false, (buffer, info, client, server)->
return return
setInterval ()-> setInterval ()->
for room in Room.all when room.started and room.random_type for room in Room.all when room and room.started and room.random_type and room.last_active_time
continue unless room and room.last_active_time
time_passed=Math.floor((moment()-room.last_active_time) / 1000) time_passed=Math.floor((moment()-room.last_active_time) / 1000)
#log.info time_passed #log.info time_passed
if time_passed >= settings.modules.hang_timeout if time_passed >= settings.modules.hang_timeout
......
...@@ -739,10 +739,7 @@ ...@@ -739,10 +739,7 @@
ref = Room.all; ref = Room.all;
for (k = 0, len = ref.length; k < len; k++) { for (k = 0, len = ref.length; k < len; k++) {
room = ref[k]; room = ref[k];
if (!(room.started && room.random_type)) { if (!(room && room.started && room.random_type && room.last_active_time)) {
continue;
}
if (!(room && room.last_active_time)) {
continue; continue;
} }
time_passed = Math.floor((moment() - room.last_active_time) / 1000); time_passed = Math.floor((moment() - room.last_active_time) / 1000);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment