Commit Graph

16 Commits

Author SHA1 Message Date
Ethan Buchman 737c30c19d minor nit 2018-02-12 19:12:24 -05:00
Anton Kaliaev 52ce4c20f8
Fix RepeatTimer memory leak (#137)
fix RepeatTimer memory leak (Refs #137)

* test case

* drain channels on reset

Leaking memory:
```
leaktest.go:144: leaktest: leaked goroutine: goroutine 116 [chan send]:
        github.com/tendermint/tmlibs/common.(*RepeatTimer).fireRoutine(0xc42006a410, 0xc4203403c0, 0xc42031b2c0)
                /go/src/github.com/tendermint/tmlibs/common/repeat_timer.go:160 +0x6e
        created by github.com/tendermint/tmlibs/common.(*RepeatTimer).reset
                /go/src/github.com/tendermint/tmlibs/common/repeat_timer.go:196 +0xe9
```

The alternative solution could be draining channels on the client side.

* add one more select instead of draining

thanks to Jae
2018-02-09 13:31:32 +04:00
Jae Kwon ff230682d1
Fix logical time (#122)
Should fix a nondeterministic bug so...
2018-02-02 12:51:30 +04:00
Jae Kwon a171d90611 Fix possibly incorrect usage of conversion 2017-12-29 10:28:00 -05:00
Ethan Buchman 558f8e7769 fix recursion 2017-12-29 10:28:00 -05:00
Ethan Buchman 76433d9040 little things 2017-12-29 10:28:00 -05:00
Jae Kwon 6b5d08f7da RepeatTimer fix 2017-12-29 10:27:54 -05:00
Ethan Buchman e2d7f1aa41 cmn: fix race 2017-12-21 14:21:15 -05:00
Ethan Buchman b0b740210c cmn: fix repeate timer test with manual ticker 2017-12-21 11:15:17 -05:00
Anton Kaliaev 70e30f74e6
Revert "Refactor repeat timer" 2017-12-19 16:16:16 -06:00
Anton Kaliaev ff2fd63bf7
rename trySend to send 2017-12-08 11:17:07 -06:00
Ethan Frey ec4adf21e0 Cleanup from PR comments 2017-12-08 10:15:26 +01:00
Ethan Frey cc7a87e27c Use Ticker in Repeat again to avoid drift 2017-12-07 11:22:54 +01:00
Ethan Frey 8797197cdf No more blocking on multiple Stop() 2017-12-07 10:38:50 +01:00
Ethan Frey 887d766c86 Refactored RepeatTimer, tests hang 2017-12-07 10:15:38 +01:00
Ethan Buchman 356657a37b move all files to common/ to begin repo merge 2017-04-18 16:33:22 -04:00