Call peer.stop() if we're not going to start() it

This commit is contained in:
Jae Kwon
2015-07-11 13:25:42 -07:00
parent 2e1d8ba054
commit 5107988fb5
2 changed files with 5 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import "sync"
/*
RepeatTimer repeatedly sends a struct{}{} to .Ch after each "dur" period.
It's good for keeping connections alive.
A RepeatTimer must be Stop()'d or it will keep a goroutine alive.
*/
type RepeatTimer struct {
Ch chan time.Time