Commit 2786c6f6 authored by mercury233's avatar mercury233

fix

parent ac20654c
...@@ -514,6 +514,7 @@ class Room ...@@ -514,6 +514,7 @@ class Room
@recorder_buffers = [] @recorder_buffers = []
@players = [] @players = []
@watcher.destroy() if @watcher @watcher.destroy() if @watcher
@recorder.destroy() if @recorder
@deleted = true @deleted = true
index = _.indexOf(ROOM_all, this) index = _.indexOf(ROOM_all, this)
ROOM_all[index] = null unless index == -1 ROOM_all[index] = null unless index == -1
...@@ -687,7 +688,9 @@ net.createServer (client) -> ...@@ -687,7 +688,9 @@ net.createServer (client) ->
return return
ygopro.stoc_send_chat(client, "正在观看云录像:R##{replay.replay_id} #{replay.player_names} #{replay.date_time}", ygopro.constants.COLORS.BABYBLUE) ygopro.stoc_send_chat(client, "正在观看云录像:R##{replay.replay_id} #{replay.player_names} #{replay.date_time}", ygopro.constants.COLORS.BABYBLUE)
client.write replay_buffer client.write replay_buffer
client.end() setTimeout (()->
client.destroy()
return), 1000
return return
return return
......
...@@ -681,6 +681,9 @@ ...@@ -681,6 +681,9 @@
if (this.watcher) { if (this.watcher) {
this.watcher.destroy(); this.watcher.destroy();
} }
if (this.recorder) {
this.recorder.destroy();
}
this.deleted = true; this.deleted = true;
index = _.indexOf(ROOM_all, this); index = _.indexOf(ROOM_all, this);
if (index !== -1) { if (index !== -1) {
...@@ -888,7 +891,9 @@ ...@@ -888,7 +891,9 @@
} }
ygopro.stoc_send_chat(client, "正在观看云录像:R#" + replay.replay_id + " " + replay.player_names + " " + replay.date_time, ygopro.constants.COLORS.BABYBLUE); ygopro.stoc_send_chat(client, "正在观看云录像:R#" + replay.replay_id + " " + replay.player_names + " " + replay.date_time, ygopro.constants.COLORS.BABYBLUE);
client.write(replay_buffer); client.write(replay_buffer);
client.end(); setTimeout((function() {
client.destroy();
}), 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