Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Refactor dial worker loop into an object and fix bug #315

Merged
merged 4 commits into from Feb 22, 2022
Merged

Conversation

vyzo
Copy link
Contributor

@vyzo vyzo commented Feb 21, 2022

The dial worker loop has been refactored into an object to aid testability.
And more importantly, a goroutine leak is fixed by dropping the unnecessary active dial tracking logic.

Closes #314

@vyzo vyzo mentioned this pull request Feb 21, 2022
dial_worker.go Show resolved Hide resolved
dial_worker.go Outdated Show resolved Hide resolved
mudler added a commit to mudler/edgevpn that referenced this pull request Feb 21, 2022
mudler added a commit to mudler/edgevpn that referenced this pull request Feb 21, 2022
mudler added a commit to mudler/edgevpn that referenced this pull request Feb 21, 2022
mudler added a commit to mudler/edgevpn that referenced this pull request Feb 21, 2022
It turns out it is not actually necessary if the limiter short-circuits.
Point being is that if the request channel has been closed, there is no active dial
any more, at which point we might as well consider it done.

This fixes the goroutine leak.
@vyzo
Copy link
Contributor Author

vyzo commented Feb 22, 2022

squashed some commits to clean up history.

@vyzo vyzo merged commit 0472e14 into master Feb 22, 2022
@vyzo vyzo deleted the fix/dial-worker branch February 22, 2022 09:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

growing goroutine
2 participants