Commit 24b33e7d authored by Rob Riepel's avatar Rob Riepel
Browse files

Import change from production version.

Original log message:

> Author: Russ Allbery <rra@stanford.edu>
> Date:   Mon Jul 18 13:16:32 2011 -0700
>
>     Change socket send errors into a warning in the poller
>
>     The poller would die if sending a packet to a remote host returned
>     an error, but the kernel may return an error if the remote host is
>     known to be down.  If we just ignore the error and then never get
>     a reply from the remote host, we'll conclude that it was down, which
>     is the correct behavior.  Turn this die into a warn so that the
>     poller doesn't exit.
>
>     Change reported by Bill MacAllister.
parent b8c57c20
......@@ -110,7 +110,7 @@ sub poll {
$todo = @hosts;
foreach (@hosts) {
my $dest = sockaddr_in(LBCD::PROTO_PORTNUM,inet_aton($ipaddrs{$_}));
$socket->send($packet,0,$dest) or die "can't send: $!";
$socket->send($packet,0,$dest) or warn "can't send to $_: $!";
}
while ($select->can_read(2.000)) {
my $buff='';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment