Skip to content

Commit bbb6d5c

Browse files
committed
add var defaultExporter
Signed-off-by: Dmitry Ponomaryov <[email protected]>
1 parent ab82c7a commit bbb6d5c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

exporter/server.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ func RunWebServer(opts *ServerOpts, exporters []*Exporter, exporterOpts *Opts, l
6464

6565
if targetHost == "" {
6666
if len(exporters) > 0 {
67-
exporters[0].Handler().ServeHTTP(w, r)
67+
defaultExporter := exporters[0]
68+
defaultExporter.Handler().ServeHTTP(w, r)
6869
return
6970
}
7071

0 commit comments

Comments
 (0)