[PR #2596] [MERGED] Fix leaked server connections #17787

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

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/2596
Author: @pappz
Created: 9/13/2024
Status: Merged
Merged: 9/16/2024
Merged by: @pappz

Base: mainHead: relay/fix-double-relay-conn


📝 Commits (5)

📊 Changes

6 files changed (+187 additions, -78 deletions)

View changed files

📝 relay/client/client.go (+19 -15)
📝 relay/client/manager.go (+13 -60)
relay/client/picker.go (+94 -0)
📝 relay/server/peer.go (+9 -0)
📝 relay/server/store.go (+5 -1)
📝 relay/server/store_test.go (+47 -2)

📄 Description

Describe your changes

Fix leaked server connections

  • close unused connections in the client lib
  • close deprecated connection in the server lib

The Server Picker is reusable in the guard if we want in the future. So we can support the server address changes.

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/2596 **Author:** [@pappz](https://github.com/pappz) **Created:** 9/13/2024 **Status:** ✅ Merged **Merged:** 9/16/2024 **Merged by:** [@pappz](https://github.com/pappz) **Base:** `main` ← **Head:** `relay/fix-double-relay-conn` --- ### 📝 Commits (5) - [`2eb9124`](https://github.com/netbirdio/netbird/commit/2eb9124179f74366d44e3b11fa383bae1d0d5d90) Fix leaked server connections - [`1a0317e`](https://github.com/netbirdio/netbird/commit/1a0317e8819e2cb0b6a936b4e025ab1710017a3a) Fix contexts - [`7f89e4b`](https://github.com/netbirdio/netbird/commit/7f89e4b3169ae6bb54ad077c5ff4728091301b26) Fix moc conn - [`b8dcd43`](https://github.com/netbirdio/netbird/commit/b8dcd43d98b6c0866019ef259b3953df865c950c) [relay] update logs (#2597) - [`d9e439a`](https://github.com/netbirdio/netbird/commit/d9e439ac3be29293d221ef7fa0943ad5e34093a0) Add logging ### 📊 Changes **6 files changed** (+187 additions, -78 deletions) <details> <summary>View changed files</summary> 📝 `relay/client/client.go` (+19 -15) 📝 `relay/client/manager.go` (+13 -60) ➕ `relay/client/picker.go` (+94 -0) 📝 `relay/server/peer.go` (+9 -0) 📝 `relay/server/store.go` (+5 -1) 📝 `relay/server/store_test.go` (+47 -2) </details> ### 📄 Description ## Describe your changes Fix leaked server connections - close unused connections in the client lib - close deprecated connection in the server lib The Server Picker is reusable in the guard if we want in the future. So we can support the server address changes. ## 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 04:07:44 -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#17787