2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-31 10:06:39 +00:00

Ignore a dead UDP handler

If the UDP handler is killed (for some reason),
allow the SSL listener to continue.
This commit is contained in:
Jarrod Johnson 2015-07-23 14:19:05 -04:00
parent 3656dea07d
commit f00a23aa58

View File

@ -1131,9 +1131,10 @@ closelog();
my @pendingconnections;
my $tconn;
my $sslfudgefactor = 0;
my $udpalive = 1;
until ($quit) {
$SIG{CHLD} = \&ssl_reaper; #set here to ensure that signal handler is not corrupted during loop
while ($udpwatcher->can_read(0)) { # take an intermission to broker some state requests from udp traffic control
while ($udpalive and $udpwatcher->can_read(0)) { # take an intermission to broker some state requests from udp traffic control
eval {
my $msg = fd_retrieve($udpctl);
if ($msg->{req} eq 'get_client_count') {
@ -1143,6 +1144,10 @@ until ($quit) {
store_fd({'clientfudge'=>$sslfudgefactor, 'sslclientcount' => $sslclients}, $udpctl);
}
};
if ($@) {
$udpalive = 0;
$bothwatcher->remove($udpctl);
}
}
if (@pendingconnections) {
while ($listenwatcher->can_read(0)) { #grab everything we can, but don't spend any time waiting for more