Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direct OnClientDisconnected calls in connectionSetupTask #1054

Open
xPaw opened this issue Nov 14, 2021 · 0 comments
Open

Direct OnClientDisconnected calls in connectionSetupTask #1054

xPaw opened this issue Nov 14, 2021 · 0 comments

Comments

@xPaw
Copy link
Member

xPaw commented Nov 14, 2021

Like this:

connectionSetupTask = recordTask.ContinueWith( t =>
{
if ( token.IsCancellationRequested )
{
LogDebug( nameof( CMClient ), "Connection cancelled before a server could be chosen." );
OnClientDisconnected( userInitiated: true );
return;

This bypasses the normal Disconnect call which means some of the objects like connectionCancellation linger around. There's a call to Disconnect() in Connect, so there's no blocking, but if there wasn't it would just crash.

Not really sure what's a clean way to fix this up because Disconnect joins connectionSetupTask, so it would just dead lock.

@yaakov-h yaakov-h added this to the 2.5.0 milestone Dec 4, 2021
@xPaw xPaw modified the milestones: 2.5.0, Some day (PRs welcome) Mar 21, 2023
@xPaw xPaw added the bug label Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants