Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
ParaEncode
Project
Project
Details
Activity
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
Linshizhi
ParaEncode
Commits
f648fb83
Commit
f648fb83
authored
May 17, 2022
by
Linshizhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix two step write bug cause of write 0 length data
parent
3921fdac
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
channel.js
src/channel.js
+4
-3
No files found.
src/channel.js
View file @
f648fb83
...
...
@@ -401,12 +401,12 @@ export class Channel {
this
.
#
readPointerCache
=
this
.
#
getReadPointer
();
if
(
!
this
.
#
isAbleToWrite
(
size
))
{
if
(
!
this
.
#
isAbleToWrite
(
size
)
||
size
==
0
)
{
return
[];
}
if
(
this
.
#
writePhase
!=
WRITE_PHASE
.
NO_STEP_WRITE
)
throw
new
Error
(
"Unable to call multiple writeStep1()
consecutively"
)
throw
new
Error
(
"Unable to call multiple writeStep1()
"
);
this
.
#
writePhase
=
WRITE_PHASE
.
WAIT_CALLER_WRITE
;
let
schedule
=
this
.
#
cpySchedule
(
size
);
...
...
@@ -431,12 +431,13 @@ export class Channel {
if
(
endPos
!=
undefined
)
this
.
#
writePhaseEndPos
=
endPos
;
return
buffers
;
}
writeStep2
()
{
if
(
this
.
#
writePhase
!=
WRITE_PHASE
.
WAIT_CALLER_WRITE
)
return
;
throw
new
Error
(
"Have to call writeStep1() first"
)
this
.
#
writePointerUpdate
(
this
.
#
writePhaseEndPos
);
this
.
#
writePhase
=
WRITE_PHASE
.
NO_STEP_WRITE
;
}
...
...
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