Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
s4ke committed Nov 14, 2023
1 parent 2588940 commit c2ccb2a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion swarmgate/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,11 @@ app.get('/:version?/services/:id/logs', async (req, res) => {
logStream.pipe(res);

req.on('close', () => {
// logStream.destroy(); // Ensure to close the stream when the client disconnects
try{
(logStream as any).destroy();
} catch (error) {
console.error(error);
}
});

} catch (error: any) {
Expand Down

0 comments on commit c2ccb2a

Please sign in to comment.