[PR #2405] [MERGED] [client] Feature/relay integration fix reconnection #17228

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

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/2405
Author: @pappz
Created: 8/7/2024
Status: Merged
Merged: 8/16/2024
Merged by: @pappz

Base: feature/relay-integration-r53Head: feature/relay-integration-fix-reconnection


📝 Commits (2)

  • fcd026b Fix invalid peer connection cleanup
  • 2ac0607 Update relay/server/store.go

📊 Changes

2 files changed (+40 additions, -1 deletions)

View changed files

📝 relay/server/store.go (+10 -1)
relay/server/store_test.go (+30 -0)

📄 Description

Describe your changes

When a peer disconnects gracefully from the server and immediately connects back, then the server will clean up an incorrect peer instance from the in-memory store. In this fix the store checks the peers instance before deleting it.

Error happened here:
https://github.com/netbirdio/netbird/actions/runs/10281624634/job/28451564919?pr=2399

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/2405 **Author:** [@pappz](https://github.com/pappz) **Created:** 8/7/2024 **Status:** ✅ Merged **Merged:** 8/16/2024 **Merged by:** [@pappz](https://github.com/pappz) **Base:** `feature/relay-integration-r53` ← **Head:** `feature/relay-integration-fix-reconnection` --- ### 📝 Commits (2) - [`fcd026b`](https://github.com/netbirdio/netbird/commit/fcd026bf835d2353a8af1ea3d9475368f6342874) Fix invalid peer connection cleanup - [`2ac0607`](https://github.com/netbirdio/netbird/commit/2ac060778d134767b276fb3e095899209bfa3521) Update relay/server/store.go ### 📊 Changes **2 files changed** (+40 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `relay/server/store.go` (+10 -1) ➕ `relay/server/store_test.go` (+30 -0) </details> ### 📄 Description ## Describe your changes When a peer disconnects gracefully from the server and immediately connects back, then the server will clean up an incorrect peer instance from the in-memory store. In this fix the store checks the peers instance before deleting it. Error happened here: https://github.com/netbirdio/netbird/actions/runs/10281624634/job/28451564919?pr=2399 ## 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:05 -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#17228