Skip to content

Commit

Permalink
Merge pull request #700 from Darkren/fix/visor-gets-offline-after-rem…
Browse files Browse the repository at this point in the history
…oval-of-underlying-vpn-tp

Fix deadlock in managed tp's `updateStatus`
  • Loading branch information
jdknives authored Feb 27, 2021
2 parents ee865e4 + 06e3a76 commit 19d88de
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/transport/managed_transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -471,10 +471,10 @@ func (mt *ManagedTransport) updateStatus(isUp bool, tries int) (err error) {
}()

mt.isUpMux.Lock()
defer mt.isUpMux.Unlock()

// If last update is the same as current, nothing needs to be done.
if mt.isUp == isUp {
mt.isUpMux.Unlock()
return nil
}

Expand Down Expand Up @@ -515,7 +515,6 @@ func (mt *ManagedTransport) updateStatus(isUp bool, tries int) (err error) {

mt.isUp = isUp
mt.isUpErr = err
mt.isUpMux.Unlock()
return err
}

Expand Down

0 comments on commit 19d88de

Please sign in to comment.