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 @@ ...@@ -85,7 +85,7 @@
const logPrefix = "<neos>"; const logPrefix = "<neos>";
//heapdump = require 'heapdump' //heapdump = require 'heapdump'
checkFileExists = async(path) => { checkFileExists = async (path) => {
var e; var e;
try { try {
await fs.promises.access(path); await fs.promises.access(path);
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
} }
}; };
createDirectoryIfNotExists = async(dirPath) => { createDirectoryIfNotExists = async (dirPath) => {
var e; var e;
try { try {
if (dirPath && !(await checkFileExists(dirPath))) { if (dirPath && !(await checkFileExists(dirPath))) {
...@@ -1793,7 +1793,7 @@ ...@@ -1793,7 +1793,7 @@
this.process.stdout.on('data', (data) => { this.process.stdout.on('data', (data) => {
const lines = data.split('\n'); const lines = data.split('\n');
for (let line of lines) { for (let line of lines) {
if(line.length >= 2) { if (line.length >= 2) {
log.info('process data:', line); log.info('process data:', line);
} }
} }
...@@ -2617,7 +2617,8 @@ ...@@ -2617,7 +2617,8 @@
} }
// 服务端到客户端(stoc) // 服务端到客户端(stoc)
server.on('data', async function(stoc_buffer) { 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; var buffer, handle_data, j, len, ref;
handle_data = (await ygopro.helper.handleBuffer(stoc_buffer, "STOC", null, { handle_data = (await ygopro.helper.handleBuffer(stoc_buffer, "STOC", null, {
...@@ -3175,7 +3176,7 @@ ...@@ -3175,7 +3176,7 @@
} }
room.recorder_buffers.push(data); 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) { 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() { room.watcher = watcher = settings.modules.test_mode.watch_public_hand ? room.recorder : net.connect(room.port, function() {
......
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