diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index 26c801466..84b193a8d 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -1055,6 +1055,9 @@ until ($quit) { } #we have a pending connection and we are under the threshold, grab one from the list and process it... my $cnnection=shift @pendingconnections; + my $previous = select ($cnnection); #assure that perl buffering is not in play at the low level + $|=1; + select ($previous); my $connection; my $child = xCAT::Utils->xfork(); #Yes we fork, IO::Socket::SSL is not threadsafe.. if ($child) { @@ -1099,6 +1102,9 @@ until ($quit) { unless ($connection) { xexit 0; } + $previous=select($connection); #also assure buffering not in play at SSL socket, which seems to be possibly independent of lower socket + $|=1; + select($previous); $clientselect->add($connection); my $peerhost=undef; my $peerfqdn=undef; @@ -2137,7 +2143,9 @@ sub send_pending_responses { $blocks += 1; } foreach (0..$blocks) { + do { syswrite($sock,$resp,4096,$_*4096); + } while ($! == EAGAIN); } }; }