Ensure TrafficController starts pprof and listens for signals
package app
import (
- "code.cloudfoundry.org/loggregator/healthendpoint"
"errors"
"fmt"
"log"
@@ -10,6 +9,8 @@ import (
"os/signal"
"time"
+ "code.cloudfoundry.org/loggregator/healthendpoint"
+
"code.cloudfoundry.org/loggregator/dopplerservice"
"code.cloudfoundry.org/loggregator/metricemitter"
"code.cloudfoundry.org/loggregator/monitor"
@@ -186,7 +187,9 @@ func (t *trafficController) Start() {
if accessMiddleware != nil {
dopplerHandler = accessMiddleware(dopplerHandler)
}
- go log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", t.conf.OutgoingDropsondePort), dopplerHandler))
+ go func() {
+ log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", t.conf.OutgoingDropsondePort), dopplerHandler))
+ }()
// We start the profiler last so that we can definitively claim that we're ready for
// connections by the time we're listening on the PPROFPort.
