Commit d9fc3b46 authored by nanahira's avatar nanahira

Merge branch 'mc'

parents 21176934 0db7d4c2
Pipeline #2834 failed with stages
in 4 minutes and 46 seconds
......@@ -1418,6 +1418,7 @@ class Room
@process = spawn './ygopro', param, {cwd: 'ygopro'}
@process_pid = @process.pid
@process.on 'error', (err)=>
log.warn 'CREATE ROOM ERROR', err
_.each @players, (player)->
ygopro.stoc_die(player, "${create_room_failed}")
this.delete()
......@@ -1454,7 +1455,8 @@ class Room
@send_replays()
@process.kill()
return
catch
catch e
log.warn 'CREATE ROOM FAIL', e
@error = "${create_room_failed}"
delete: ->
return if @deleted
......
......@@ -1836,7 +1836,7 @@
}
spawn(firstSeed) {
var i, j, l, param, seeds;
var e, i, j, l, param, seeds;
param = [0, this.hostinfo.lflist, this.hostinfo.rule, this.hostinfo.mode, this.hostinfo.duel_rule, (this.hostinfo.no_check_deck ? 'T' : 'F'), (this.hostinfo.no_shuffle_deck ? 'T' : 'F'), this.hostinfo.start_lp, this.hostinfo.start_hand, this.hostinfo.draw_count, this.hostinfo.time_limit, this.hostinfo.replay_mode];
if (firstSeed) {
param.push(firstSeed);
......@@ -1856,6 +1856,7 @@
});
this.process_pid = this.process.pid;
this.process.on('error', (err) => {
log.warn('CREATE ROOM ERROR', err);
_.each(this.players, function(player) {
return ygopro.stoc_die(player, "${create_room_failed}");
});
......@@ -1905,6 +1906,8 @@
}
});
} catch (error1) {
e = error1;
log.warn('CREATE ROOM FAIL', e);
return this.error = "${create_room_failed}";
}
}
......
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