socket fixes, fix tank jumping
This commit is contained in:
parent
9620703efc
commit
b3dacbd6f6
13 changed files with 44 additions and 46 deletions
|
@ -18,7 +18,7 @@ internal sealed class ByteChannelWebSocket(WebSocket socket, ILogger logger, int
|
|||
yield return _buffer.ToArray();
|
||||
}
|
||||
|
||||
if (socket.State != WebSocketState.Closed)
|
||||
if (socket.State is not WebSocketState.Closed and not WebSocketState.Aborted)
|
||||
Debugger.Break();
|
||||
}
|
||||
|
||||
|
|
|
@ -93,9 +93,9 @@ internal sealed class ClientScreenServer(
|
|||
await _channel.SendAsync(pixels.Data);
|
||||
_lastSentPixels = pixels;
|
||||
}
|
||||
catch (ChannelClosedException)
|
||||
catch (WebSocketException ex)
|
||||
{
|
||||
_logger.LogWarning("send failed, channel is closed");
|
||||
_logger.LogWarning(ex, "send failed");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue