mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-27 03:31:42 +00:00
linter: couple fixes
This commit is contained in:
@ -140,18 +140,16 @@ func (bs *BaseService) OnStop() {}
|
||||
|
||||
// Implements Service
|
||||
func (bs *BaseService) Reset() (bool, error) {
|
||||
if atomic.CompareAndSwapUint32(&bs.stopped, 1, 0) {
|
||||
// whether or not we've started, we can reset
|
||||
atomic.CompareAndSwapUint32(&bs.started, 1, 0)
|
||||
|
||||
bs.Quit = make(chan struct{})
|
||||
return true, bs.impl.OnReset()
|
||||
} else {
|
||||
if stopped := atomic.CompareAndSwapUint32(&bs.stopped, 1, 0); !stopped {
|
||||
bs.Logger.Debug(Fmt("Can't reset %v. Not stopped", bs.name), "impl", bs.impl)
|
||||
return false, nil
|
||||
}
|
||||
// never happens
|
||||
return false, nil // nolint: vet
|
||||
|
||||
// whether or not we've started, we can reset
|
||||
atomic.CompareAndSwapUint32(&bs.started, 1, 0)
|
||||
|
||||
bs.Quit = make(chan struct{})
|
||||
return true, bs.impl.OnReset()
|
||||
}
|
||||
|
||||
// Implements Service
|
||||
|
Reference in New Issue
Block a user