Commit 8879d940 authored by martin hou's avatar martin hou

fix: 恢复对闲忙的判断处理

parent 6dc39bfc
...@@ -384,8 +384,8 @@ function Jensen(log, conn) { ...@@ -384,8 +384,8 @@ function Jensen(log, conn) {
}; };
this.busy = function() { this.busy = function() {
// return Boolean(current); return Boolean(current);
return false // return false
} }
const tryReceive = function () { const tryReceive = function () {
...@@ -1032,14 +1032,11 @@ Jensen.prototype.getFile = async function (filename, length, ondata, onprogress) ...@@ -1032,14 +1032,11 @@ Jensen.prototype.getFile = async function (filename, length, ondata, onprogress)
} }
self._progress_report[k] = true; self._progress_report[k] = true;
} }
if (percent >= 100)
{
Logger.debug('jensen', 'file-transfer', 'recv:' + recvBytes);
}
if (recvBytes >= length) if (recvBytes >= length)
{ {
Logger.debug('jensen', 'file-transfer', 'current: 100%, ' + recvBytes); // Logger.debug('jensen', 'file-transfer', 'current: 100%, ' + recvBytes);
onprogress?.(recvBytes); if (!(k in self._progress_report)) onprogress?.(length);
self._progress_report[k] = true;
} }
} }
this.registerHandler(TRANSFER_FILE, handler); this.registerHandler(TRANSFER_FILE, handler);
......
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