Skip to content

[0.81] Fix unhandled synchronous throw from WebSocket ConnectAsync#15789

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

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

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:56
@JunielKatarn JunielKatarn changed the title [81] Fix unhandled synchronous throw from WebSocket ConnectAsync [0.81] Fix unhandled synchronous throw from WebSocket ConnectAsync Mar 17, 2026
@JunielKatarn JunielKatarn enabled auto-merge (squash) March 17, 2026 01:04
@JunielKatarn JunielKatarn merged commit 97bd1fc into microsoft:0.81-stable Mar 17, 2026
92 checks passed
@JunielKatarn JunielKatarn deleted the OC/11296967/wsconex-81 branch March 17, 2026 07:21
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