This commit is contained in:
Owain G. Ainsworth 2013-12-11 00:41:03 +00:00
parent 7df65008be
commit 95563691cd

View file

@ -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()
}