-Have client detect prematurely ended xCAT sessions (i.e. without serverdone performed)

-Fix problem where server would prematurely end xCAT sessions.


git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1209 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2008-04-25 21:09:18 +00:00
parent ca0849536a
commit 37c0e9303b
2 changed files with 6 additions and 1 deletions

View File

@ -142,6 +142,7 @@ sub submit_request {
print $client $msg;
my $response;
my $rsp;
my $cleanexit=0;
while (<$client>) {
$response .= $_;
if ($response =~ m/<\/xcatresponse>/) {
@ -149,10 +150,14 @@ sub submit_request {
$response='';
$callback->($rsp);
if ($rsp->{serverdone}) {
$cleanexit=1;
last;
}
}
}
unless ($cleanexit) {
print STDERR "ERROR/WARNING: communication with the xCAT server seems to have been ended prematurely\n";
}
###################################
# scan_plugins

View File

@ -947,7 +947,7 @@ sub convey_response {
my $parsel = new IO::Select;
$parsel->add($parent_fd);
if ($parsel->can_read(5)) { #block up to five seconds for parent to ack
<parent_fd>;
<$parent_fd>;
}
#<$parent_fd>; #Block until parent acks data
# KeyAttr => [], NoAttr => 1)