Skip to content

Commit

Permalink
fix bug where stream ends twice
Browse files Browse the repository at this point in the history
my mistake in how to use pull-streams
  • Loading branch information
ahdinosaur committed Nov 23, 2023
1 parent 24fb91b commit 92968c2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ function createDecryptStream(key, ciphertextBlockSize = DEFAULT_BLOCK_SIZE) {

if (decrypter.final) {
debug('%h : decrypter final', debugKey)
this.emit('end')
break
}
}
Expand All @@ -146,7 +145,7 @@ function createDecryptStream(key, ciphertextBlockSize = DEFAULT_BLOCK_SIZE) {
new Error('pull-secretstream/decryptStream: stream ended before final tag'),
)
}
// otherwise the stream should have already been ended.
this.queue(null)
},
)

Expand Down

0 comments on commit 92968c2

Please sign in to comment.