mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-12 08:42:38 +02:00
close copilot stream controller in finally
This commit is contained in:
parent
b4b862c8e0
commit
376e308186
1 changed files with 1 additions and 2 deletions
|
|
@ -49,8 +49,6 @@ export async function GET(request: Request, props: { params: Promise<{ streamId:
|
||||||
controller.enqueue(encoder.encode(`event: done\ndata: ${JSON.stringify(event)}\n\n`));
|
controller.enqueue(encoder.encode(`event: done\ndata: ${JSON.stringify(event)}\n\n`));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
controller.close();
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error processing copilot stream:', error);
|
console.error('Error processing copilot stream:', error);
|
||||||
controller.error(error);
|
controller.error(error);
|
||||||
|
|
@ -65,6 +63,7 @@ export async function GET(request: Request, props: { params: Promise<{ streamId:
|
||||||
console.error("Error logging usage", error);
|
console.error("Error logging usage", error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
controller.close();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue