[PR #2565] [MERGED] [client] Ensure engine is stopped before starting it back #15329

Open
opened 2026-08-05 03:07:25 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/2565
Author: @hurricanehrndz
Created: 9/9/2024
Status: Merged
Merged: 9/13/2024
Merged by: @mlsmaycon

Base: mainHead: chernand/fix_resource_busy_bug


📝 Commits (4)

  • e7256d9 Update NS state when stopping DNS server
  • 3381081 Restart engine by triggering re-create
  • 3ae3dea Stop existing engine before creating new
  • 11ee227 Add bool to track runningChan state

📊 Changes

2 files changed (+33 additions, -9 deletions)

View changed files

📝 client/internal/connect.go (+9 -1)
📝 client/internal/engine.go (+24 -8)

📄 Description

Describe your changes

Instead of starting and stopping the engine, stop engine and force recreate from connect. This might tie network monitor to autoconnect feature. Additionally, when recreating the engine ensure existing engine is stopped.

#2454
#2196
#2011

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/2565 **Author:** [@hurricanehrndz](https://github.com/hurricanehrndz) **Created:** 9/9/2024 **Status:** ✅ Merged **Merged:** 9/13/2024 **Merged by:** [@mlsmaycon](https://github.com/mlsmaycon) **Base:** `main` ← **Head:** `chernand/fix_resource_busy_bug` --- ### 📝 Commits (4) - [`e7256d9`](https://github.com/netbirdio/netbird/commit/e7256d9785a833b84ca153d2d918d777697645ab) Update NS state when stopping DNS server - [`3381081`](https://github.com/netbirdio/netbird/commit/3381081b61c28278d7298cfbb76bc27e46c3155d) Restart engine by triggering re-create - [`3ae3dea`](https://github.com/netbirdio/netbird/commit/3ae3deafb0018f5e10f5bcde8b7620889a363ecf) Stop existing engine before creating new - [`11ee227`](https://github.com/netbirdio/netbird/commit/11ee2273ef87080c83a2ea6a117da2132fcc7f4e) Add bool to track runningChan state ### 📊 Changes **2 files changed** (+33 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `client/internal/connect.go` (+9 -1) 📝 `client/internal/engine.go` (+24 -8) </details> ### 📄 Description ## Describe your changes Instead of starting and stopping the engine, stop engine and force recreate from connect. This might tie network monitor to autoconnect feature. Additionally, when recreating the engine ensure existing engine is stopped. ## Issue ticket number and link #2454 #2196 #2011 ### 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 03:07: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#15329