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)->
return
setInterval ()->
for room in Room.all when room.started and room.random_type
continue unless room and room.last_active_time
for room in Room.all when room and room.started and room.random_type and room.last_active_time
time_passed=Math.floor((moment()-room.last_active_time) / 1000)
#log.info time_passed
if time_passed >= settings.modules.hang_timeout
......
......@@ -739,10 +739,7 @@
ref = Room.all;
for (k = 0, len = ref.length; k < len; k++) {
room = ref[k];
if (!(room.started && room.random_type)) {
continue;
}
if (!(room && room.last_active_time)) {
if (!(room && room.started && room.random_type && room.last_active_time)) {
continue;
}
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