diff --git a/emitter.go b/emitter.go index 6f631b0fc..a8f0ae3ef 100644 --- a/emitter.go +++ b/emitter.go @@ -2,6 +2,7 @@ package main import ( "io" + "time" ) func Start(stop chan int) { @@ -9,9 +10,12 @@ func Start(stop chan int) { go CopyMulty(in, Plugins.Outputs...) } - select { - case <-stop: - return + for { + select { + case <-stop: + return + case <- time.After(1 * time.Second): + } } }