mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-22 13:29:08 +02:00
Removes deadlock
This commit is contained in:
@@ -296,7 +296,10 @@ func (c *ConnectClient) run(runCtx context.Context, config *profilemanager.Confi
|
|||||||
log.Debug(err)
|
log.Debug(err)
|
||||||
if s, ok := gstatus.FromError(err); ok && (s.Code() == codes.PermissionDenied) {
|
if s, ok := gstatus.FromError(err); ok && (s.Code() == codes.PermissionDenied) {
|
||||||
state.Set(StatusNeedsLogin)
|
state.Set(StatusNeedsLogin)
|
||||||
_ = c.Stop()
|
// Called from inside the run goroutine: tear the engine down
|
||||||
|
// directly, never through the lifecycle queue (sup.stop would
|
||||||
|
// deadlock — the supervisor would wait for this very run to end).
|
||||||
|
_ = c.stopEngine()
|
||||||
return backoff.Permanent(wrapErr(err)) // unrecoverable error
|
return backoff.Permanent(wrapErr(err)) // unrecoverable error
|
||||||
}
|
}
|
||||||
return wrapErr(err)
|
return wrapErr(err)
|
||||||
|
|||||||
Reference in New Issue
Block a user