mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-29 15:59:10 +01:00
[client] Assert the sync response is dropped for the right reason
Start returns before the first sync response necessarily arrives, so the disabled case could pass against a client that had simply not synced yet. Wait for the engine to apply a sync, then require the persistence error rather than any error, so a not-started engine no longer satisfies it. Also document that PeerState is a read-only snapshot which shares its mutex and route map with the recorder.
This commit is contained in:
@@ -49,6 +49,11 @@ type PeerConnStatus = peer.ConnStatus
|
||||
|
||||
// PeerState is the status recorder's view of one remote peer, as carried in
|
||||
// the Peers field of the value returned by Status and StatusSnapshot.
|
||||
//
|
||||
// It is a read-only snapshot. The scalar fields are copied under the
|
||||
// recorder's lock and are safe to read, but the value still shares its mutex
|
||||
// and route map with the recorder, so callers must not mutate it or call its
|
||||
// route methods.
|
||||
type PeerState = peer.State
|
||||
|
||||
// Client manages a netbird embedded client instance.
|
||||
|
||||
Reference in New Issue
Block a user