File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -150,8 +150,10 @@ func (p *PrometheusExporter) Start() error {
150150
151151 // Start the htlc monitor goroutine. This will subscribe to htlcs and
152152 // update all of our routing-related metrics.
153- if err := p .htlcMonitor .start (); err != nil {
154- return err
153+ if ! p .monitoringCfg .DisableHtlc {
154+ if err := p .htlcMonitor .start (); err != nil {
155+ return err
156+ }
155157 }
156158
157159 // Finally, we'll launch the HTTP server that Prometheus will use to
@@ -181,7 +183,9 @@ func (p *PrometheusExporter) Start() error {
181183// before returning.
182184func (p * PrometheusExporter ) Stop () {
183185 log .Println ("Stopping Prometheus Exporter" )
184- p .htlcMonitor .stop ()
186+ if ! p .monitoringCfg .DisableHtlc {
187+ p .htlcMonitor .stop ()
188+ }
185189}
186190
187191// Errors returns an error channel that any failures experienced by its
You can’t perform that action at this time.
0 commit comments