diff --git a/signal.go b/signal.go index 861ad334f1..1a1039c0f8 100644 --- a/signal.go +++ b/signal.go @@ -29,8 +29,8 @@ func mainInterruptHandler() { case <-interruptChannel: btcdLog.Infof("Received SIGINT (Ctrl+C). Shutting down...") // run handlers in LIFO order. - for i := range interruptCallbacks { - idx := len(interruptCallbacks) -1 -i + for i := range interruptCallbacks { + idx := len(interruptCallbacks) - 1 - i callback := interruptCallbacks[idx] callback() }