Skip to content

Commit

Permalink
Allow non local udp connections in net_response (influxdata#5219)
Browse files Browse the repository at this point in the history
  • Loading branch information
glinton authored and Jean-Louis Dupond committed Apr 22, 2019
1 parent 70e275f commit 86170e2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions plugins/inputs/net_response/net_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,8 @@ func (n *NetResponse) UDPGather() (tags map[string]string, fields map[string]int
start := time.Now()
// Resolving
udpAddr, err := net.ResolveUDPAddr("udp", n.Address)
LocalAddr, err := net.ResolveUDPAddr("udp", "127.0.0.1:0")
// Connecting
conn, err := net.DialUDP("udp", LocalAddr, udpAddr)
conn, err := net.DialUDP("udp", nil, udpAddr)
// Handle error
if err != nil {
setResult(ConnectionFailed, fields, tags, n.Expect)
Expand Down

0 comments on commit 86170e2

Please sign in to comment.