Skip to content

Commit

Permalink
fix(outputs.prometheus_client): Always default to TCP (#14471)
Browse files Browse the repository at this point in the history
(cherry picked from commit 9ec0894)
  • Loading branch information
powersj committed Jan 8, 2024
1 parent 8eb7db9 commit 96995a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/outputs/prometheus_client/prometheus_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"context"
"crypto/tls"
_ "embed"
"errors"
"fmt"
"net"
"net/http"
Expand Down Expand Up @@ -217,12 +216,13 @@ func (p *PrometheusClient) listen() (net.Listener, error) {
return p.listenTCP(p.Listen)
}
switch strings.ToLower(u.Scheme) {
case "tcp", "http":
case "", "tcp", "http":
return p.listenTCP(u.Host)
case "vsock":
return p.listenVsock(u.Host)
default:
return p.listenTCP(u.Host)
}
return nil, errors.New("Unknown scheme")
}

func (p *PrometheusClient) Connect() error {
Expand Down

0 comments on commit 96995a9

Please sign in to comment.