Skip to content

Commit

Permalink
fix stream flush
Browse files Browse the repository at this point in the history
  • Loading branch information
hazae41 committed Feb 22, 2023
1 parent 7ae9630 commit 5a2c9ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "module",
"name": "@hazae41/cadenas",
"version": "0.2.3",
"version": "0.2.5",
"description": "Zero-copy TLS protocol for the web",
"homepage": "https://github.com/hazae41/cadenas",
"repository": "github:hazae41/cadenas",
Expand Down
6 changes: 3 additions & 3 deletions src/libs/streams/pair.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ export class StreamPairSink<R, W> implements UnderlyingSink<W> {
}

async abort(reason?: any) {
this.pair.source.controller.error(reason)
await this.subsink.abort?.(reason)
this.pair.source.controller.error(reason)
}

async close() {
this.pair.source.controller.close()
await this.subsink.close?.()
this.pair.source.controller.close()
}

}
Expand Down Expand Up @@ -101,8 +101,8 @@ export class StreamPairSource<R, W> implements UnderlyingDefaultSource<R> {
}

async cancel(reason?: any) {
this.pair.sink.controller.error(reason)
await this.subsource.cancel?.(reason)
this.pair.sink.controller.error(reason)
}

}

0 comments on commit 5a2c9ca

Please sign in to comment.