Skip to content

[0.76] Fix unhandled synchronous throw from WebSocket ConnectAsync#15794

Open
JunielKatarn wants to merge 1 commit intomicrosoft:0.76-stablefrom
jurocha-ms:OC/11296967/wsconex-76
Open

[0.76] Fix unhandled synchronous throw from WebSocket ConnectAsync#15794
JunielKatarn wants to merge 1 commit intomicrosoft:0.76-stablefrom
jurocha-ms:OC/11296967/wsconex-76

Conversation

@JunielKatarn
Copy link
Contributor

@JunielKatarn JunielKatarn commented Mar 17, 2026

Backport of #15783

Microsoft Reviewers: Open in CodeFlow

…t#15783)

* Fix unhandled synchronous throw from ConnectAsync

(Generated summary)
ConnectAsync can throw synchronously (e.g. WININET_E_INVALID_CA /
0x80072EE1 on certificate validation failure) before returning an
IAsyncAction. Move the call inside the existing try/catch block so
such exceptions are routed through Fail() instead of propagating
unhandled. Add ConnectAsyncThrowsSynchronously unit test to cover
this path.

* Change files

* Add explaining comment

* clang format
@JunielKatarn JunielKatarn requested review from a team as code owners March 17, 2026 00:58
@JunielKatarn JunielKatarn enabled auto-merge (squash) March 17, 2026 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants