-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:
parent
ca0849536a
commit
37c0e9303b
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user