[GH-ISSUE #2110] Connected field is true after netbird down #4305

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

Originally created by @ctrl-zzz on GitHub (Jun 8, 2024).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/2110

Describe the problem

I've been trying to implement a session-expire feature that checks the connected status of a peer; when a peer gets disconnected its login is marked as expired.
The problem is that after netbird down the connected status seems to be stuck at true, so the session can never expire.

I've made sure my code doesn't interfere with the expected behavior and double checked without applying my changes that the problem persists.

To Reproduce

Steps to reproduce the behavior:

  1. In the management/server/account.go file print the peer.Status.Connected value immediately after the MarkPeerConnected call
  2. Deploy code
  3. Get NetBird started
  4. Perform netbird up and netbird down
  5. Check printed value of the connected field

Expected behavior

The connected field should be set to false.

Are you using NetBird Cloud?

No, I'm selfhosting it.

Additional context

When GETting a peer using the NetBird REST API its connected field behaves normally, being set at false after netbird down.

Originally created by @ctrl-zzz on GitHub (Jun 8, 2024). Original GitHub issue: https://github.com/netbirdio/netbird/issues/2110 **Describe the problem** I've been trying to implement a session-expire feature that checks the `connected` status of a peer; when a peer gets disconnected its login is marked as expired. The problem is that after `netbird down` the `connected` status seems to be stuck at `true`, so the session can never expire. I've made sure my code doesn't interfere with the expected behavior and double checked without applying my changes that the problem persists. **To Reproduce** Steps to reproduce the behavior: 1. In the `management/server/account.go` file print the `peer.Status.Connected` value immediately after the [MarkPeerConnected call](https://github.com/netbirdio/netbird/blob/main/management/server/account.go#L1897C53-L1897C59) 2. Deploy code 3. Get NetBird started 4. Perform `netbird up` and `netbird down` 5. Check printed value of the `connected` field **Expected behavior** The `connected` field should be set to false. **Are you using NetBird Cloud?** No, I'm selfhosting it. **Additional context** When GETting a peer using the NetBird REST API its `connected` field behaves normally, being set at `false` after `netbird down`.
saavagebueno added the bugpeer-managementmanagement-service labels 2026-08-05 00:56:58 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#4305