Commit 0274d35e authored by Chunchi Che's avatar Chunchi Che

update small

parent aff8a316
Pipeline #18617 passed with stages
in 7 minutes and 3 seconds
......@@ -85,7 +85,7 @@
const logPrefix = "<neos>";
//heapdump = require 'heapdump'
checkFileExists = async(path) => {
checkFileExists = async (path) => {
var e;
try {
await fs.promises.access(path);
......@@ -96,7 +96,7 @@
}
};
createDirectoryIfNotExists = async(dirPath) => {
createDirectoryIfNotExists = async (dirPath) => {
var e;
try {
if (dirPath && !(await checkFileExists(dirPath))) {
......@@ -982,7 +982,7 @@
});
if (result) {
result.welcome = '${random_duel_enter_room_waiting}';
//log.info 'found room', player_name
//log.info 'found room', player_name
} else if (memory_usage < 90 && !(settings.modules.max_rooms_count && rooms_count >= settings.modules.max_rooms_count)) {
type = type ? type : settings.modules.random_duel.default_type;
name = type + ',RANDOM#' + Math.floor(Math.random() * 100000);
......@@ -1200,7 +1200,7 @@
};
tmot = setTimeout(function() {
room.disconnect(client, error);
//SERVER_kick(dinfo.old_server)
//SERVER_kick(dinfo.old_server)
}, settings.modules.reconnect.wait_time);
dinfo.timeout = tmot;
disconnect_list[CLIENT_get_authorize_key(client)] = dinfo;
......@@ -1793,7 +1793,7 @@
this.process.stdout.on('data', (data) => {
const lines = data.split('\n');
for (let line of lines) {
if(line.length >= 2) {
if (line.length >= 2) {
log.info('process data:', line);
}
}
......@@ -2429,7 +2429,7 @@
client.server = server;
server.client = client;
client.setTimeout(2000); //连接前超时2秒
// 释放处理
closeHandler = function(error) {
var room;
......@@ -2617,7 +2617,8 @@
}
// 服务端到客户端(stoc)
server.on('data', async function(stoc_buffer) {
log.info(logPrefix, `client_name=${server.client.name}`, `stoc_proto=${stoc_buffer[2]}`, "stoc data:", stoc_buffer);
const gamMsgFunc = stoc_buffer[2] === 1 ? stoc_buffer[3] : undefined;
log.info(logPrefix, `client_name=${server.client.name}`, `stoc_proto=${stoc_buffer[2]}`, `gameMsgFunc=${gamMsgFunc}`, "stoc data:", stoc_buffer);
var buffer, handle_data, j, len, ref;
handle_data = (await ygopro.helper.handleBuffer(stoc_buffer, "STOC", null, {
......@@ -3175,7 +3176,7 @@
}
room.recorder_buffers.push(data);
});
recorder.on('error', function(error) {});
recorder.on('error', function(error) { });
}
if (settings.modules.cloud_replay.enable_halfway_watch && !room.watcher && !room.hostinfo.no_watch) {
room.watcher = watcher = settings.modules.test_mode.watch_public_hand ? room.recorder : net.connect(room.port, function() {
......@@ -3257,7 +3258,7 @@
client.last_game_msg = buffer;
client.last_game_msg_title = msg_name;
}
// log.info(client.name, client.last_game_msg_title)
// log.info(client.name, client.last_game_msg_title)
} else if (msg_name !== 'RETRY') {
client.last_game_msg = buffer;
client.last_game_msg_title = msg_name;
......
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