Projet

Général

Profil

Révision 1fc177ce

ID1fc177ce9a78f28d18ad2e08ff4545a241aa0976
Parent 1357b818
Enfant 6abc523a

Ajouté par Hannes Erven il y a presque 6 ans

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

Voir les différences:

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