[PR #2528] [MERGED] [client] Avoid deadlock when auto connect and early exit #19765

Open
opened 2026-08-05 05:06:26 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/2528
Author: @mlsmaycon
Created: 9/3/2024
Status: Merged
Merged: 9/4/2024
Merged by: @pascal-fischer

Base: mainHead: fix/deadlock-when-disable-auto-connect


📝 Commits (8)

  • 7ed524f Avoid deadlock when auto connect is enabled
  • 472ead1 use chan error for signaling and add signals on defer
  • 5b6360f add nil check and close channel
  • e175997 removed wait from daemon start completely
  • 6ac21c6 register daemon service earlier
  • f99c163 Revert "register daemon service earlier"
  • 3d704a3 handle error
  • 2d84d58 add ctx done exit

📊 Changes

2 files changed (+28 additions, -18 deletions)

View changed files

📝 client/internal/connect.go (+8 -5)
📝 client/server/server.go (+20 -13)

📄 Description

Describe your changes

resolves #2527

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/2528 **Author:** [@mlsmaycon](https://github.com/mlsmaycon) **Created:** 9/3/2024 **Status:** ✅ Merged **Merged:** 9/4/2024 **Merged by:** [@pascal-fischer](https://github.com/pascal-fischer) **Base:** `main` ← **Head:** `fix/deadlock-when-disable-auto-connect` --- ### 📝 Commits (8) - [`7ed524f`](https://github.com/netbirdio/netbird/commit/7ed524f0d3c2fc67798eb74351c680c71c2dc48f) Avoid deadlock when auto connect is enabled - [`472ead1`](https://github.com/netbirdio/netbird/commit/472ead16fcdd51da3264b0aef55fd644125a19ca) use chan error for signaling and add signals on defer - [`5b6360f`](https://github.com/netbirdio/netbird/commit/5b6360f417a252e7d7445a5f2dde55a8e8637be9) add nil check and close channel - [`e175997`](https://github.com/netbirdio/netbird/commit/e1759975019554f1d47483900ec8d65b4c15c9e3) removed wait from daemon start completely - [`6ac21c6`](https://github.com/netbirdio/netbird/commit/6ac21c6c3451c2dae02f55cf7332e8db89585571) register daemon service earlier - [`f99c163`](https://github.com/netbirdio/netbird/commit/f99c163399f674fccb79917e217594409115c4e9) Revert "register daemon service earlier" - [`3d704a3`](https://github.com/netbirdio/netbird/commit/3d704a3c7347768cda3db36f27ecc0cbf3483ed2) handle error - [`2d84d58`](https://github.com/netbirdio/netbird/commit/2d84d589a8d6586c1014e6e38f95adb852f31df3) add ctx done exit ### 📊 Changes **2 files changed** (+28 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `client/internal/connect.go` (+8 -5) 📝 `client/server/server.go` (+20 -13) </details> ### 📄 Description ## Describe your changes ## Issue ticket number and link resolves #2527 ### 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 05:06:26 -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#19765