Skip to content

Commit d0d1837

Browse files
rthornton128bakins
authored andcommitted
fix #20 - check if URL is an empty string (#26)
1 parent ef345f9 commit d0d1837

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

collector.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ func (c *collector) Collect(ch chan<- prometheus.Metric) {
149149
err error
150150
)
151151

152-
if c.exporter.fcgiEndpoint != nil {
152+
if c.exporter.fcgiEndpoint != nil && c.exporter.fcgiEndpoint.String() != "" {
153153
body, err = getDataFastcgi(c.exporter.fcgiEndpoint)
154154
} else {
155155
body, err = getDataHTTP(c.exporter.endpoint)

0 commit comments

Comments
 (0)