Skip to content

Fix InvalidOperationException when reconnecting#6629

Open
SAY-5 wants to merge 1 commit into
space-wizards:masterfrom
SAY-5:fix/reconnect-status-change-invalidop
Open

Fix InvalidOperationException when reconnecting#6629
SAY-5 wants to merge 1 commit into
space-wizards:masterfrom
SAY-5:fix/reconnect-status-change-invalidop

Conversation

@SAY-5

@SAY-5 SAY-5 commented Jun 9, 2026

Copy link
Copy Markdown

Reconnecting can throw An attempt was made to transition a task to a final state when it had already completed from HandleStatusChanged, since the awaiting status-change task may already be completed (e.g. cancelled when the other Happy Eyeballs attempt wins). Switched that SetResult to TrySetResult to match the other completion sites in the file.

Closes #6575

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
@SAY-5 SAY-5 requested a review from PJB3005 as a code owner June 9, 2026 23:13
@PJB3005

PJB3005 commented Jun 18, 2026

Copy link
Copy Markdown
Member

I don't understand. Shouldn't the TCS be removed from _awaitingStatusChange before it's cancelled? I don't see the flow of execution that would lead to this ever getting hit.

@PJB3005 PJB3005 added T: Bugfix Type: Bugs and/or bugfixes A: Game Networking Networking for primary game traffic labels Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A: Game Networking Networking for primary game traffic T: Bugfix Type: Bugs and/or bugfixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reconnecting causes an InvalidOperationException

2 participants