File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ app.Use(async (context, next) =>
102102 if (context .WebSockets .IsWebSocketRequest )
103103 {
104104 using var websocket = await context .WebSockets .AcceptWebSocketAsync ();
105- using var pipe = WebSocketPipe .Create (websocket , options );
105+ using var pipe = WebSocketPipe .Create (websocket , true );
106106 await Task .WhenAll (Echo (pipe ), pipe .RunAsync (context .RequestAborted ));
107107 }
108108 else
Original file line number Diff line number Diff line change @@ -96,10 +96,8 @@ app.Use(async (context, next) =>
9696 {
9797 if (context .WebSockets .IsWebSocketRequest )
9898 {
99- using var websocket = await context .WebSockets .AcceptWebSocketAsync (
100- context .WebSockets .WebSocketRequestedProtocols .FirstOrDefault ());
101-
102- using var pipe = WebSocketPipe .Create (websocket , options );
99+ using var websocket = await context .WebSockets .AcceptWebSocketAsync ();
100+ using var pipe = WebSocketPipe .Create (websocket , true );
103101 await Task .WhenAll (Echo (pipe ), pipe .RunAsync (context .RequestAborted ));
104102 }
105103 else
You can’t perform that action at this time.
0 commit comments