Skip to content

Commit 00c01f2

Browse files
twisslarabr
authored andcommitted
Unlock input reader after transforming stream
1 parent 0311b67 commit 00c01f2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/streams.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ function transform(input, process = () => undefined, finish = () => undefined) {
257257
async pull(controller) {
258258
if (allDone) {
259259
controller.close();
260+
input.releaseLock();
260261
return;
261262
}
262263
try {
@@ -276,6 +277,7 @@ function transform(input, process = () => undefined, finish = () => undefined) {
276277
// `close` here. Otherwise, it will get called in the
277278
// next call to `pull`, above (since `allDone == true`).
278279
controller.close();
280+
input.releaseLock();
279281
return;
280282
}
281283
}

0 commit comments

Comments
 (0)