Skip to content

WebSocket.CloseStatus: Actual value is null when socket is open, not non-existent WebSocketCloseStatus.None #12884

Description

@mattflaschen

Type of issue

Code doesn't work

Description

WebSocket.CloseStatus Property (8.0) states, "If the close handshake has not been initiated yet, WebSocketCloseStatus.None is returned."

Actually, WebSocketCloseStatus.None does not exist. Before the close handshake begins, CloseStatus is null, as noted in the field declaration. (The actual CloseStatus property just returns the backing field.)

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.net.websockets.websocket.closestatus?view=net-8.0

Content source URL

https://github.com/dotnet/dotnet-api-docs-temp/blob/live/xml/System.Net.WebSockets/WebSocket.xml

Document Version Independent Id

309b1648-c776-ccd8-f070-942978354273

Platform Id

a928965b-7541-0003-9034-7d2e0789857b

Article author

@karelz

Metadata

Metadata

Assignees

No one assigned

    Labels

    untriagedNew issue has not been triaged by the area owner

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions