Skip to content

[0.74] Fix unhandled synchronous throw from WebSocket ConnectAsync#15796

Merged
JunielKatarn merged 1 commit intomicrosoft:0.74-stablefrom
jurocha-ms:OC/11296967/wsconex-74
Mar 17, 2026
Merged

[0.74] Fix unhandled synchronous throw from WebSocket ConnectAsync#15796
JunielKatarn merged 1 commit intomicrosoft:0.74-stablefrom
jurocha-ms:OC/11296967/wsconex-74

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
@JunielKatarn JunielKatarn merged commit 90aa5f0 into microsoft:0.74-stable Mar 17, 2026
60 checks passed
@JunielKatarn JunielKatarn deleted the OC/11296967/wsconex-74 branch March 17, 2026 06:57
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