Fix prometheus output panic on reload

closes #1530
This commit is contained in:
Cameron Sparr
2016-09-12 10:09:13 +01:00
parent b2ea39077e
commit c3aa43a6bd
2 changed files with 2 additions and 1 deletions

View File

@@ -28,7 +28,7 @@ var sampleConfig = `
`
func (p *PrometheusClient) Start() error {
prometheus.MustRegister(p)
prometheus.Register(p)
defer func() {
if r := recover(); r != nil {
// recovering from panic here because there is no way to stop a