Fix main goroutine

This commit is contained in:
Leonid Bugaev
2014-10-09 23:16:56 +04:00
parent 5f883e08ce
commit 758995d8f5
+7 -3
View File
@@ -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):
}
}
}