Commit 56206d32 authored by martin hou's avatar martin hou

Merge branch 'v20250816' into device-mgr

parents 738ed1cc 14b8f807
......@@ -469,7 +469,6 @@ function Jensen(log, conn) {
totalBytes += result.data.byteLength;
// 做一个回调,怎么样找到它呢?
blocks.push(result.data);
tryReceive();
if (self.decodeTimeout) clearTimeout(self.decodeTimeout);
self.decodeTimeout = setTimeout(function () {
tryDecode();
......@@ -477,11 +476,12 @@ function Jensen(log, conn) {
if (self.onreceive) {
try { self.onreceive(totalBytes); } catch (e) {}
}
tryReceive();
};
const tryDecode = function () {
// if (!current) return;
Logger.info('jensen', 'tryDecode', `try to decode buffer with ${blocks.length} blocks`);
Logger.info('jensen', 'tryDecode', `try to decode buffer with ${blocks.length} blocks @ ${current}`);
// 一个容器,比单独任意一个小包要大一点儿,好像还差一点儿
// 当前总缓冲区大小
let totalBuffLen = 0;
......
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