Skip to content

[0.82] Fix unhandled synchronous throw from WebSocket ConnectAsync - #15788

Merged
Julio César Rocha (JunielKatarn) merged 1 commit into
microsoft:0.82-stablefrom
jurocha-ms:OC/11296967/wsconex-82
Mar 17, 2026
Merged

[0.82] Fix unhandled synchronous throw from WebSocket ConnectAsync#15788
Julio César Rocha (JunielKatarn) merged 1 commit into
microsoft:0.82-stablefrom
jurocha-ms:OC/11296967/wsconex-82

Conversation

@JunielKatarn

@JunielKatarn Julio César Rocha (JunielKatarn) commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

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 Julio César Rocha (JunielKatarn) changed the title [82] Fix unhandled synchronous throw from WebSocket ConnectAsync [0.82] Fix unhandled synchronous throw from WebSocket ConnectAsync Mar 17, 2026
@JunielKatarn
Julio César Rocha (JunielKatarn) merged commit 6738aad into microsoft:0.82-stable Mar 17, 2026
42 checks passed
@JunielKatarn
Julio César Rocha (JunielKatarn) deleted the OC/11296967/wsconex-82 branch April 29, 2026 21:35
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