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

Handle canceling schedule and avoid recursive call #1636

Merged
merged 3 commits into from
Mar 3, 2024

Conversation

mlsmaycon
Copy link
Collaborator

Describe your changes

Using time.Ticker allows us to avoid recursive calls that may end up in schedule running and possible deadlock if no routine is listening for cancel calls

switch to closing channel

Issue ticket number and link

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

Using time.Ticker allow us to avoid recursive call that may end up in schedule running and possible deadlock if no routine is listening for cancel calls

switch to closing channel
pappz
pappz previously approved these changes Feb 27, 2024
@mlsmaycon mlsmaycon merged commit 17f5abc into main Mar 3, 2024
16 checks passed
@mlsmaycon mlsmaycon deleted the fix/handle-canceling-schedule branch March 3, 2024 09:35
Foosec pushed a commit to Foosec/netbird that referenced this pull request May 8, 2024
Using time.Ticker allows us to avoid recursive calls that may end up in schedule running and possible deadlock if no routine is listening for cancel calls
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