fix the issue that xcatd hangs when reading the request which is formatted in one line like litefile request from statelte CN

This commit is contained in:
daniceexi 2014-01-08 07:42:35 -05:00
parent 23b836102a
commit adf723db25

View File

@ -2014,7 +2014,7 @@ sub get_request {
my $request = shift;
if ($encode eq "xml") {
my $line = "";
while ($line !~ m/<\/xcatrequest>/) {
while ($request !~ m/<\/xcatrequest>/) {
my $flags=fcntl($sock,F_GETFL,0);
$flags |= O_NONBLOCK; #we want sysread to bail on us, select seems to be evil to us still..
fcntl($sock,F_SETFL,$flags);