[PR #1636] [MERGED] Handle canceling schedule and avoid recursive call #14080

Closed
opened 2026-08-05 02:09:25 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/1636
Author: @mlsmaycon
Created: 2/27/2024
Status: Merged
Merged: 3/3/2024
Merged by: @mlsmaycon

Base: mainHead: fix/handle-canceling-schedule


📝 Commits (3)

  • 87d1fc3 Handle canceling schedule and avoid recursive call
  • 19873db add comment and adjust log position
  • 5af9bbf check for closed channel and adjust tests

📊 Changes

2 files changed (+50 additions, -29 deletions)

View changed files

📝 management/server/scheduler.go (+35 -24)
📝 management/server/scheduler_test.go (+15 -5)

📄 Description

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

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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/1636 **Author:** [@mlsmaycon](https://github.com/mlsmaycon) **Created:** 2/27/2024 **Status:** ✅ Merged **Merged:** 3/3/2024 **Merged by:** [@mlsmaycon](https://github.com/mlsmaycon) **Base:** `main` ← **Head:** `fix/handle-canceling-schedule` --- ### 📝 Commits (3) - [`87d1fc3`](https://github.com/netbirdio/netbird/commit/87d1fc3a2fb2409a287b3d05c6f12193bc6aa520) Handle canceling schedule and avoid recursive call - [`19873db`](https://github.com/netbirdio/netbird/commit/19873db1a9c08e7365b255c0117a00e120392bb7) add comment and adjust log position - [`5af9bbf`](https://github.com/netbirdio/netbird/commit/5af9bbfec9e4ca72189349c4f3ca8b18fa1ed5e0) check for closed channel and adjust tests ### 📊 Changes **2 files changed** (+50 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `management/server/scheduler.go` (+35 -24) 📝 `management/server/scheduler_test.go` (+15 -5) </details> ### 📄 Description ## 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 - [x] 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 02:09:25 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#14080