Refactor
This commit is contained in:
1 parent
8ab5af0052
commit
b282f05549
66 files changed
+2328
-213
No files matched your search
@@ -128,7 +128,10 @@ export function createDisconnectAwareStream(transformStream, streamController, o
|
||||
controller.enqueue(value);
|
||||
} catch (error) {
|
||||
const wasConnected = streamController.isConnected();
|
||||
streamController.handleError(error);
|
||||
// Controller already closed = downstream ended; not an upstream error, skip noisy log.
|
||||
const msg0 = error?.message || "";
|
||||
const isControllerClosed = msg0.includes("already closed") || msg0.includes("Invalid state");
|
||||
if (!isControllerClosed) streamController.handleError(error);
|
||||
reader.cancel().catch(() => {});
|
||||
writer.abort().catch(() => {});
|
||||
|
||||
|
||||
Reference in new issue
Block a user