Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

@davidsh
Copy link
Contributor

@davidsh davidsh commented Apr 17, 2019

An HttpListener websocket test was failing after the change from PR #36928. That PR made changes
to tighten up the transition to the Closed state after the closing handshake had completed.

That PR missed some additional changes needed especially in cases where a server (such as loopback)
sends the close frame almost concurrently with the client sending the close frame.

This PR fixes the close frame handshake logic and also makes some optimizations in cases where the
websocket has already transitioned to the Aborted state during the closing handshake. In that case,
the websocket should not wait for a close frame to be received but should simply proceed to closing
the connection.

Fixes #36963

An HttpListener websocket test was failing after the change from PR dotnet#36928. That PR made changes
to tighten up the transition to the Closed state after the closing handshake had completed.

That PR missed some additional changes needed especially in cases where a server (such as loopback)
sends the close frame almost concurrently with the client sending the close frame.

This PR fixes the close frame handshake logic and also makes some optimizations in cases where the
websocket has already transitioned to the Aborted state during the closing handshake. In that case,
the websocket should not wait for a close frame to be received but should simply proceed to closing
the connection.

Fixes #36963
@davidsh davidsh added this to the 3.0 milestone Apr 17, 2019
@davidsh davidsh self-assigned this Apr 17, 2019
@davidsh
Copy link
Contributor Author

davidsh commented Apr 17, 2019

/azp run corefx-outerloop-windows

@davidsh
Copy link
Contributor Author

davidsh commented Apr 17, 2019

/azp run corefx-outerloop-linux

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@davidsh
Copy link
Contributor Author

davidsh commented Apr 17, 2019

/azp run corefx-outerloop-osx

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

1 similar comment
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@davidsh davidsh requested review from a team and stephentoub April 17, 2019 20:55
Copy link
Member

@wfurt wfurt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@davidsh davidsh merged commit 1824535 into dotnet:master Apr 18, 2019
@davidsh davidsh deleted the fix_websocket_closehandshake branch April 18, 2019 03:33
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
An HttpListener websocket test was failing after the change from PR dotnet/corefx#36928. That PR made changes
to tighten up the transition to the Closed state after the closing handshake had completed.

That PR missed some additional changes needed especially in cases where a server (such as loopback)
sends the close frame almost concurrently with the client sending the close frame.

This PR fixes the close frame handshake logic and also makes some optimizations in cases where the
websocket has already transitioned to the Aborted state during the closing handshake. In that case,
the websocket should not wait for a close frame to be received but should simply proceed to closing
the connection.

Fixes dotnet/corefx#36963

Commit migrated from dotnet/corefx@1824535
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failing ManagedWebSocket assert breaking HttpListener tests

3 participants