From c0e1ab620aff9d14ecb1450d8f0b5fe45d4ec2b3 Mon Sep 17 00:00:00 2001 From: Alex Macocian Date: Fri, 23 May 2025 14:03:48 +0200 Subject: [PATCH] Use MapGet for OpenAPI documentation generation Fix for shared memory stream --- Net.Sdk.Web.Extensions/Net.Sdk.Web.Extensions.csproj | 2 +- Net.Sdk.Web.Extensions/WebApplicationExtensions.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Net.Sdk.Web.Extensions/Net.Sdk.Web.Extensions.csproj b/Net.Sdk.Web.Extensions/Net.Sdk.Web.Extensions.csproj index f5442e8..29c184a 100644 --- a/Net.Sdk.Web.Extensions/Net.Sdk.Web.Extensions.csproj +++ b/Net.Sdk.Web.Extensions/Net.Sdk.Web.Extensions.csproj @@ -6,7 +6,7 @@ enable Library true - 0.8.5 + 0.8.6 Alexandru Macocian LICENSE true diff --git a/Net.Sdk.Web.Extensions/WebApplicationExtensions.cs b/Net.Sdk.Web.Extensions/WebApplicationExtensions.cs index c16080c..f4c229f 100644 --- a/Net.Sdk.Web.Extensions/WebApplicationExtensions.cs +++ b/Net.Sdk.Web.Extensions/WebApplicationExtensions.cs @@ -34,7 +34,7 @@ public static class WebApplicationExtensions where TWebSocketRoute : WebSocketRouteBase { app.ThrowIfNull(); - return app.Map(route, async context => + return app.MapGet(route, async context => { if (context.WebSockets.IsWebSocketRequest) { @@ -140,7 +140,7 @@ public static class WebApplicationExtensions throw new InvalidOperationException("Route HttpContext is null"); } - using var ms = StreamManager.GetStream(route.Context.Session.Id); + using var ms = StreamManager.GetStream(); ValueWebSocketReceiveResult result; while(webSocket.State == WebSocketState.Open && !cancellationToken.IsCancellationRequested) {