Commit 361928c5 authored by mercury233's avatar mercury233

fix error log

parent 2ca3c28c
...@@ -582,7 +582,7 @@ net.createServer (client) -> ...@@ -582,7 +582,7 @@ net.createServer (client) ->
buffer=new Buffer(replay.replay_buffer,'binary') buffer=new Buffer(replay.replay_buffer,'binary')
zlib.unzip buffer, (err, replay_buffer) -> zlib.unzip buffer, (err, replay_buffer) ->
if err if err
log.info err log.info "cloud replay unzip error: " + err
ygopro.stoc_send_chat(client, "播放录像出错", ygopro.constants.COLORS.RED) ygopro.stoc_send_chat(client, "播放录像出错", ygopro.constants.COLORS.RED)
client.end() client.end()
return return
...@@ -732,7 +732,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)-> ...@@ -732,7 +732,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
_.each result, (replay_id,id)-> _.each result, (replay_id,id)->
redisdb.hgetall "replay:"+replay_id, (err, replay)-> redisdb.hgetall "replay:"+replay_id, (err, replay)->
if err or !replay if err or !replay
log.info err log.info "cloud replay getall error: " + err
return return
ygopro.stoc_send_chat(client,"<#{id-0+1}> R##{replay_id} #{replay.player_names} #{replay.date_time}", ygopro.constants.COLORS.BABYBLUE) ygopro.stoc_send_chat(client,"<#{id-0+1}> R##{replay_id} #{replay.player_names} #{replay.date_time}", ygopro.constants.COLORS.BABYBLUE)
return return
...@@ -751,7 +751,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)-> ...@@ -751,7 +751,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
if (replay_id>0 and replay_id<=9) if (replay_id>0 and replay_id<=9)
redisdb.lindex client.remoteAddress+":replays", replay_id-1, (err, replay_id)-> redisdb.lindex client.remoteAddress+":replays", replay_id-1, (err, replay_id)->
if err or !replay_id if err or !replay_id
log.info err log.info "cloud replay replayid error: " + err
ygopro.stoc_die(client, "没有找到录像") ygopro.stoc_die(client, "没有找到录像")
return return
redisdb.hgetall "replay:"+replay_id, client.open_cloud_replay redisdb.hgetall "replay:"+replay_id, client.open_cloud_replay
......
...@@ -761,7 +761,7 @@ ...@@ -761,7 +761,7 @@
buffer = new Buffer(replay.replay_buffer, 'binary'); buffer = new Buffer(replay.replay_buffer, 'binary');
zlib.unzip(buffer, function(err, replay_buffer) { zlib.unzip(buffer, function(err, replay_buffer) {
if (err) { if (err) {
log.info(err); log.info("cloud replay unzip error: " + err);
ygopro.stoc_send_chat(client, "播放录像出错", ygopro.constants.COLORS.RED); ygopro.stoc_send_chat(client, "播放录像出错", ygopro.constants.COLORS.RED);
client.end(); client.end();
return; return;
...@@ -919,7 +919,7 @@ ...@@ -919,7 +919,7 @@
_.each(result, function(replay_id, id) { _.each(result, function(replay_id, id) {
redisdb.hgetall("replay:" + replay_id, function(err, replay) { redisdb.hgetall("replay:" + replay_id, function(err, replay) {
if (err || !replay) { if (err || !replay) {
log.info(err); log.info("cloud replay getall error: " + err);
return; return;
} }
ygopro.stoc_send_chat(client, "<" + (id - 0 + 1) + "> R#" + replay_id + " " + replay.player_names + " " + replay.date_time, ygopro.constants.COLORS.BABYBLUE); ygopro.stoc_send_chat(client, "<" + (id - 0 + 1) + "> R#" + replay_id + " " + replay.player_names + " " + replay.date_time, ygopro.constants.COLORS.BABYBLUE);
...@@ -938,7 +938,7 @@ ...@@ -938,7 +938,7 @@
if (replay_id > 0 && replay_id <= 9) { if (replay_id > 0 && replay_id <= 9) {
redisdb.lindex(client.remoteAddress + ":replays", replay_id - 1, function(err, replay_id) { redisdb.lindex(client.remoteAddress + ":replays", replay_id - 1, function(err, replay_id) {
if (err || !replay_id) { if (err || !replay_id) {
log.info(err); log.info("cloud replay replayid error: " + err);
ygopro.stoc_die(client, "没有找到录像"); ygopro.stoc_die(client, "没有找到录像");
return; return;
} }
......
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