Skip to content

Commit f88f36f

Browse files
committed
Address PR feedback
1 parent 438a428 commit f88f36f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketStream.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ public class WebSocketStream : Stream
1616
private const int DefaultCloseTimeoutSeconds = 60;
1717

1818
/// <summary>Whether the stream has been disposed.</summary>
19-
private protected bool _disposed;
19+
private bool _disposed;
2020

2121
/// <summary>
2222
/// Initializes a new instance of the <see cref="WebSocketStream"/> class using a specified <see cref="WebSocket"/> instance.
2323
/// </summary>
2424
/// <param name="webSocket">The <see cref="WebSocket"/> wrapped by this instance.</param>
25-
private protected WebSocketStream(WebSocket webSocket) => WebSocket = webSocket;
25+
private WebSocketStream(WebSocket webSocket) => WebSocket = webSocket;
2626

2727
/// <summary>Creates a <see cref="WebSocketStream"/> that delegates to a wrapped <see cref="WebSocket"/>.</summary>
2828
/// <param name="webSocket">The wrapped <see cref="WebSocket"/>.</param>
@@ -249,7 +249,7 @@ public override async ValueTask DisposeAsync()
249249

250250
if (_closeTimeout is { } timeout)
251251
{
252-
if (WebSocket.State is < WebSocketState.CloseSent)
252+
if (WebSocket.State is < WebSocketState.Closed)
253253
{
254254
CancellationTokenSource? cts = null;
255255
CancellationToken ct;

0 commit comments

Comments
 (0)