From 7ad4abe8f788a1882e51ac7aa7c8984a6bd82556 Mon Sep 17 00:00:00 2001 From: ligc Date: Mon, 26 Oct 2009 09:56:54 +0000 Subject: [PATCH] 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 --- perl-xCAT/xCAT/Table.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index 693f95f2c..990b876ef 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -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();