diff --git a/cmd/circologd/main.go b/cmd/circologd/main.go index 12faac1..ddde695 100644 --- a/cmd/circologd/main.go +++ b/cmd/circologd/main.go @@ -35,6 +35,7 @@ func main() { hub := circolog.NewHub(*bufsize) handler := syslog.NewChannelHandler(hub.LogMessages) + go hub.Run() server := syslog.NewServer() server.SetFormat(syslog.RFC5424) @@ -57,7 +58,6 @@ func main() { fmt.Fprintln(os.Stderr, "argh", err) os.Exit(1) } - go hub.Run() setupHTTP(hub) httpServer := http.Server{Handler: nil} @@ -94,7 +94,6 @@ func main() { fmt.Fprintln(os.Stderr, "Error closing http server:", err) } return - default: } } }