fix for bug 2844957: wait for clisock to be available in dbc_submit

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4447 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
ligc 2009-10-26 09:56:54 +00:00
parent 1fa38e9797
commit 7ad4abe8f7

View File

@ -88,7 +88,11 @@ sub dbc_submit {
$request->{'wantarray'} = wantarray();
my $data = freeze($request);
$data.= "\nENDOFFREEZEQFVyo4Cj6Q0v\n";
my $clisock = IO::Socket::UNIX->new(Peer => $dbsockpath, Type => SOCK_STREAM, Timeout => 120 );
my $clisock;
while(!($clisock = IO::Socket::UNIX->new(Peer => $dbsockpath, Type => SOCK_STREAM, Timeout => 120) ) ) {
#print "waiting for clisock to be available\n";
sleep 0.1;
}
unless ($clisock) {
use Carp qw/cluck/;
cluck();