Skip to content

Commit

Permalink
fix #20 - check if URL is an empty string (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
rthornton128 authored and bakins committed Oct 18, 2018
1 parent ef345f9 commit d0d1837
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func (c *collector) Collect(ch chan<- prometheus.Metric) {
err error
)

if c.exporter.fcgiEndpoint != nil {
if c.exporter.fcgiEndpoint != nil && c.exporter.fcgiEndpoint.String() != "" {
body, err = getDataFastcgi(c.exporter.fcgiEndpoint)
} else {
body, err = getDataHTTP(c.exporter.endpoint)
Expand Down

0 comments on commit d0d1837

Please sign in to comment.