fix: close SSE stream when error occurred
This commit is contained in:
@@ -212,7 +212,8 @@ app.openapi(route, async (c) => {
|
||||
async (err, stream) => {
|
||||
console.error("Error occurred in SSE");
|
||||
console.error(err);
|
||||
stream.writeln("An error occurred");
|
||||
await stream.writeln("An error occurred");
|
||||
await stream.close();
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user