Skip to content

Coder Connect hangs if you sign out and sign into a different deployment #69

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

Closed
spikecurtis opened this issue Apr 15, 2025 · 0 comments · Fixed by #70
Closed

Coder Connect hangs if you sign out and sign into a different deployment #69

spikecurtis opened this issue Apr 15, 2025 · 0 comments · Fixed by #70
Assignees
Labels
bug Something isn't working

Comments

@spikecurtis
Copy link
Collaborator

Reproduction steps:

  1. Sign into a deployment
  2. Turn on Coder Connect and wait for it to start
  3. Turn off Coder Connect
  4. Sign out
  5. Sign into a different deployment (different URL)
  6. Turn on Coder Connect

Coder Connect spinner will spin indefinitely and never come up.

We've traced it to Downloader.cs which maintains a ConcurrentDictionary called _downloads, which tracks in-progress download tasks keyed off destination path. We don't ever clear tasks out of this dictionary when they complete, so a new download, for a different URL gets stuck in a loop looking up the task in the dictionary, waiting for it (which returns instantly because it's done), and then noticing it's for a different URL, and retrying in a loop.

@spikecurtis spikecurtis added the bug Something isn't working label Apr 15, 2025
@spikecurtis spikecurtis self-assigned this Apr 17, 2025
spikecurtis added a commit that referenced this issue Apr 22, 2025
fixes #69

Fixes `Downloader` to remove the `DownloadTask` when it is done via a completion. This will allow changing Coder deployments, which use different URLs but whose files are downloaded to the same place.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant