Browse Source

nil-ThrottleTimer.Stop() does nothing

pull/117/head
Jae Kwon 10 years ago
parent
commit
f51cfc03ea
2 changed files with 7 additions and 2 deletions
  1. +2
    -2
      Makefile
  2. +5
    -0
      common/throttle_timer.go

+ 2
- 2
Makefile View File

@ -10,7 +10,7 @@ install:
go install github.com/tendermint/tendermint/cmd/debora
go install github.com/tendermint/tendermint/cmd/stdinwriter
go install github.com/tendermint/tendermint/cmd/logjack
@echo -n `git rev-parse --verify HEAD` > $(TMROOT)/revisions
@echo -n `git rev-parse --verify HEAD` >> $(TMROOT)/revisions
build:
go build -o build/tendermint github.com/tendermint/tendermint/cmd/tendermint
@ -48,4 +48,4 @@ gen_client:
go generate rpc/core_client/*.go
revision:
@echo -n `git rev-parse --verify HEAD` > $(TMROOT)/revisions
@echo -n `git rev-parse --verify HEAD` >> $(TMROOT)/revisions

+ 5
- 0
common/throttle_timer.go View File

@ -46,7 +46,12 @@ func (t *ThrottleTimer) Set() {
}
}
// For ease of .Stop()'ing services before .Start()'ing them,
// we ignore .Stop()'s on nil ThrottleTimers
func (t *ThrottleTimer) Stop() bool {
if t == nil {
return false
}
close(t.quit)
return t.timer.Stop()
}

Loading…
Cancel
Save