Commit 7331ef0b authored by IamI's avatar IamI

Logging.

parent 8cf45e48
...@@ -343,10 +343,13 @@ let matchResponse = function(req, res) { ...@@ -343,10 +343,13 @@ let matchResponse = function(req, res) {
switch (config.match.reconnect) { switch (config.match.reconnect) {
case "reconnect": case "reconnect":
res.writeHead(200, {'Content-Type': 'application/json', 'Cache-Control': 'no-cache'}); res.writeHead(200, {'Content-Type': 'application/json', 'Cache-Control': 'no-cache'});
res.end(playingPlayerPool.get(username)); let message = playingPlayerPool.get(username);
localLog(username + " is relining to: " + message);
res.end(message);
return; return;
case "drop": case "drop":
rejectUser(res); rejectUser(res);
localLog(username + " is droped due to try relining.");
return; return;
default: default:
break; // 什么都不做,继续加入匹配池。 break; // 什么都不做,继续加入匹配池。
...@@ -357,7 +360,7 @@ let matchResponse = function(req, res) { ...@@ -357,7 +360,7 @@ let matchResponse = function(req, res) {
localLog(username + ' apply for a ' + arg.arena + ' match.'); localLog(username + ' apply for a ' + arg.arena + ' match.');
// 选择匹配池 // 选择匹配池
let pool = null; let pool = null;
if (arg.arena == 'athletic') if (arg.arena === 'athletic')
pool = athleticUserPool; pool = athleticUserPool;
else else
pool = entertainUserPool; pool = entertainUserPool;
......
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