aboutsummaryrefslogtreecommitdiffstats
path: root/src/ratelimiter.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2017-12-01 23:37:26 +0100
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2017-12-01 23:37:26 +0100
commiteaca1ee1f79422a501394415fd4ae8f227a134af (patch)
tree1fbfad20b2e9a6b68d5ccd928ed6678596de76b9 /src/ratelimiter.go
parentFixed receive path infinite loop (diff)
downloadwireguard-go-eaca1ee1f79422a501394415fd4ae8f227a134af.tar.xz
wireguard-go-eaca1ee1f79422a501394415fd4ae8f227a134af.zip
More consistent use of signal struct
Diffstat (limited to 'src/ratelimiter.go')
-rw-r--r--src/ratelimiter.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ratelimiter.go b/src/ratelimiter.go
index 4f8227e..6e5f005 100644
--- a/src/ratelimiter.go
+++ b/src/ratelimiter.go
@@ -66,11 +66,11 @@ func (rate *Ratelimiter) GarbageCollectEntries() {
rate.mutex.Unlock()
}
-func (rate *Ratelimiter) RoutineGarbageCollector(stop chan struct{}) {
+func (rate *Ratelimiter) RoutineGarbageCollector(stop Signal) {
timer := time.NewTimer(time.Second)
for {
select {
- case <-stop:
+ case <-stop.Wait():
return
case <-timer.C:
rate.GarbageCollectEntries()