mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
fix: WebSockets: Force KeepAliveInterval to Zero
This commit is contained in:
parent
285ec968c0
commit
9a42fe3342
@ -131,7 +131,7 @@ async Task ProcessTcpClient(TcpClient tcpClient, CancellationToken token)
|
|||||||
WebSocketHttpContext context = await webSocketServerFactory.ReadHttpHeaderFromStreamAsync(tcpClient, stream, token);
|
WebSocketHttpContext context = await webSocketServerFactory.ReadHttpHeaderFromStreamAsync(tcpClient, stream, token);
|
||||||
if (context.IsWebSocketRequest)
|
if (context.IsWebSocketRequest)
|
||||||
{
|
{
|
||||||
// Force KeepAliveInterval to Zero, otherwise the transport is unstable and causes random disconnects
|
// Force KeepAliveInterval to Zero, otherwise the transport is unstable and causes random disconnects.
|
||||||
WebSocketServerOptions options = new WebSocketServerOptions() { KeepAliveInterval = TimeSpan.Zero, SubProtocol = "binary" };
|
WebSocketServerOptions options = new WebSocketServerOptions() { KeepAliveInterval = TimeSpan.Zero, SubProtocol = "binary" };
|
||||||
|
|
||||||
WebSocket webSocket = await webSocketServerFactory.AcceptWebSocketAsync(context, options);
|
WebSocket webSocket = await webSocketServerFactory.AcceptWebSocketAsync(context, options);
|
||||||
|
Loading…
Reference in New Issue
Block a user