mirror of
https://github.com/pnx/pinger.git
synced 2026-06-16 03:24:54 +02:00
main.go: stop ticker in eventLoop() before return.
This commit is contained in:
parent
aed415a531
commit
26babe4ae2
1 changed files with 1 additions and 0 deletions
1
main.go
1
main.go
|
|
@ -33,6 +33,7 @@ func eventLoop(pinger *probing.Pinger) {
|
|||
select {
|
||||
// Got signal. stop pinger and exit goroutine
|
||||
case <-sig:
|
||||
ticker.Stop()
|
||||
pinger.Stop()
|
||||
return
|
||||
// Ticker ticks. print stats.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue