sync: set ws keepalive interval to 15s

This commit is contained in:
Abdullah Atta
2026-04-11 10:54:51 +05:00
parent a56ef1fe11
commit 4278b0624e
+7
View File
@@ -213,6 +213,7 @@ namespace Notesnook.API
var signalR = services.AddSignalR((hub) =>
{
hub.MaximumReceiveMessageSize = 100 * 1024 * 1024;
hub.KeepAliveInterval = TimeSpan.FromSeconds(15);
hub.ClientTimeoutInterval = TimeSpan.FromMinutes(10);
hub.EnableDetailedErrors = true;
}).AddMessagePackProtocol().AddJsonProtocol();
@@ -270,6 +271,12 @@ namespace Notesnook.API
app.UseOpenTelemetryPrometheusScrapingEndpoint((context) => context.Request.Path == "/metrics" && context.Connection.LocalPort == 5067);
app.UseResponseCompression();
app.UseWebSockets(new Microsoft.AspNetCore.Builder.WebSocketOptions
{
KeepAliveInterval = TimeSpan.FromSeconds(30),
KeepAliveTimeout = TimeSpan.FromSeconds(60),
});
app.UseCors("notesnook");
app.UseVersion(Servers.NotesnookAPI);