Commit 55adbbb8 authored by martin hou's avatar martin hou

fix: 增加跟踪日志输出

parent 267929ec
......@@ -514,7 +514,7 @@ function Jensen(log, conn) {
rst = decodeMessage(bview, startIndex, buffLength);
if (rst == null)
{
Logger.info('jensen', 'decode', `start: ${startIndex}, length: ${buffLength}, cut: 0`);
Logger.info('jensen', 'decode', `start: ${startIndex}, length: ${buffLength}, cut: [0]`);
}
else Logger.info('jensen', 'decode', `start: ${startIndex}, length: ${buffLength}, cut: ${rst.length}`);
} catch (e) {
......@@ -522,7 +522,9 @@ function Jensen(log, conn) {
crash = true;
break;
}
if (rst == null || rst.length == 0) {
if (rst == null) {
// 当解码失败时,是不是要看看剩余的字节数?
Logger.error('jensen', 'break', `Blocks: ${blocks.length}`);
break;
}
startIndex += rst.length;
......
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