Skip to content

Commit

Permalink
Fix error state race on mgmt connection error (#2892)
Browse files Browse the repository at this point in the history
  • Loading branch information
lixmal authored Nov 15, 2024
1 parent 582bb58 commit a7d5c52
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/internal/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ func (c *ConnectClient) run(mobileDependency MobileDependency, probes *ProbeHold

engineCtx, cancel := context.WithCancel(c.ctx)
defer func() {
c.statusRecorder.MarkManagementDisconnected(state.err)
_, err := state.Status()
c.statusRecorder.MarkManagementDisconnected(err)
c.statusRecorder.CleanLocalPeerState()
cancel()
}()
Expand Down

0 comments on commit a7d5c52

Please sign in to comment.