Commit 2d829a30 authored by nanahira's avatar nanahira

fix zombie room again

parent 3af28f86
Pipeline #28638 passed with stages
in 28 minutes and 57 seconds
......@@ -278,7 +278,7 @@ loadLFList = (path) ->
lflists.push({date: moment(list.match(/!([\d\.]+)/)[1], 'YYYY.MM.DD').utcOffset("-08:00"), tcg: list.indexOf('TCG') != -1})
catch
init = () ->
init = () ->
log.info('Reading config.')
await createDirectoryIfNotExists("./config")
await importOldConfig()
......@@ -623,10 +623,10 @@ init = () ->
# clean zombie rooms
setInterval ()->
for room in ROOM_all when room and room.established and room.duel_stage == ygopro.constants.DUEL_STAGE.BEGIN and !room.players.length
for room in ROOM_all when room and !room.get_playing_player().length
room.terminate()
return
, 600000
, 300000
if settings.modules.random_duel.enabled
setInterval ()->
......
......@@ -792,11 +792,11 @@
var l, len1, room;
for (l = 0, len1 = ROOM_all.length; l < len1; l++) {
room = ROOM_all[l];
if (room && room.established && room.duel_stage === ygopro.constants.DUEL_STAGE.BEGIN && !room.players.length) {
if (room && !room.get_playing_player().length) {
room.terminate();
}
}
}, 600000);
}, 300000);
if (settings.modules.random_duel.enabled) {
setInterval(async function() {
var l, len1, room, time_passed;
......
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