End SSE connection successfully no matter the cause

This commit is contained in:
Infi
2024-08-27 17:11:16 +02:00
parent 3dedc315ca
commit 3da41c86fc
+4
View File
@@ -59,6 +59,10 @@ public class SSEConnection
// "No Content" (204) didn't work for Firefox, so manually closing the connection on client side
await ctx.Response.SendFinalChunk(new CloseEvent().Build());
// Manually confirm that we have finished our connection, even if the final response failed
// This can happen if the client disconnects before the server does
ctx.Response.ResponseSent = true;
Done = true;
}
}