Révision 1fc177ce
multi_tcp_ping: enable service_check by default
By default, Net::Ping will report a good attempt even when the remote end returns "connection refused". By enabling service_check, the connection must have been established.
See https://perldoc.perl.org/Net/Ping.html#Functions
| plugins/ping/multi_tcp_ping | ||
|---|---|---|
| 105 | 105 |
|
| 106 | 106 |
$p=Net::Ping->new("tcp", $defaults{timeout});
|
| 107 | 107 |
$p->hires(); |
| 108 |
$p->service_check(1); |
|
| 108 | 109 |
$p->{port_num} = $host->[1] || $defaults{port};
|
| 109 | 110 |
|
| 110 | 111 |
($ret, $time, $ip) = $p->ping($host->[0]); |
Formats disponibles : Unified diff