First implementation of sveltekit for webinterface

This commit is contained in:
Infi
2025-09-20 16:07:46 +02:00
parent 9b3e3f79e3
commit 94b345c6a3
40 changed files with 3074 additions and 97 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ public class SSEConnection
if (!OutboundQueue.TryDequeue(out var outgoingEvent))
continue;
if (!await ctx.Response.SendChunk(outgoingEvent.Build(), Token))
if (!await ctx.Response.SendChunk(outgoingEvent.Build(), false, Token))
{
Plugin.Log.Information("SSE connection was unable to send new data");
Plugin.Log.Information($"Client disconnected: {ctx.Guid}");
@@ -53,7 +53,7 @@ public class SSEConnection
finally
{
// "No Content" (204) didn't work for Firefox, so manually closing the connection on client side
await ctx.Response.SendFinalChunk(new CloseEvent().Build());
await ctx.Response.SendChunk(new CloseEvent().Build(), true, Token);
// 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