formacao
This commit is contained in:
+4
-2
@@ -27,7 +27,9 @@ var StreamingApi = class {
|
||||
done ? controller.close() : controller.enqueue(value);
|
||||
},
|
||||
cancel: () => {
|
||||
this.abort();
|
||||
if (!this.closed) {
|
||||
this.abort();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -49,11 +51,11 @@ var StreamingApi = class {
|
||||
return new Promise((res) => setTimeout(res, ms));
|
||||
}
|
||||
async close() {
|
||||
this.closed = true;
|
||||
try {
|
||||
await this.writer.close();
|
||||
} catch {
|
||||
}
|
||||
this.closed = true;
|
||||
}
|
||||
async pipe(body) {
|
||||
this.writer.releaseLock();
|
||||
|
||||
Reference in New Issue
Block a user