2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 09:36:41 +00:00

Reduce communication between SSL and UDP

Previously, every TLS connection caused a communication with UDP
and this was bad.  Then every UDP connection caused a communication
and this was better.  This takes things a little further by only
doing the communication if there is a known interested party now.
This commit is contained in:
Jarrod Johnson 2015-05-27 10:39:52 -04:00
parent fdc408f270
commit 6916b37234

View File

@ -526,6 +526,8 @@ sub grant_tcrequests {
my $requestors = shift;
my $udpcontext = shift;
my $availableslots = $batchclients;
if (not keys %{$requestors}) { return; } # skip the interaction with SSL if
# no requests are actually pending
my $oldtime = time()-180; #drop requests older than three minutes if still around
my $msg;
eval { store_fd({'req'=>'get_client_count'}, $sslctl); $msg = fd_retrieve($sslctl); };