Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
J
jensen
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Skye Yu
jensen
Commits
14b8f807
Commit
14b8f807
authored
Sep 10, 2025
by
martin hou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 调整接收与解码的次序
parent
4e0f785b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
jensen.js
src/utils/jensen.js
+2
-2
No files found.
src/utils/jensen.js
View file @
14b8f807
...
...
@@ -468,7 +468,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
();
...
...
@@ -476,11 +475,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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment