Skip to content

Commit 4b50596

Browse files
fix lint task in CI
1 parent d3f2674 commit 4b50596

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/cmap/wire_protocol/on_data.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function onData(
4949
/** Set to true only after event listeners have been removed. */
5050
let finished = false;
5151

52-
const iterator: AsyncGenerator<Buffer> = {
52+
const iterator: AsyncGenerator<Buffer> & AsyncDisposable = {
5353
next() {
5454
// First, we consume all unread events
5555
const value = unconsumedEvents.shift();
@@ -87,6 +87,10 @@ export function onData(
8787

8888
[Symbol.asyncIterator]() {
8989
return this;
90+
},
91+
92+
async [Symbol.asyncDispose]() {
93+
await closeHandler();
9094
}
9195
};
9296

0 commit comments

Comments
 (0)