===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/Attic/ldirectord,v
retrieving revision 1.77.2.38
retrieving revision 1.77.2.39
diff -u -r1.77.2.38 -r1.77.2.39
--- linux-ha/ldirectord/ldirectord	2006/01/31 00:30:26	1.77.2.38
+++ linux-ha/ldirectord/ldirectord	2006/01/31 00:40:03	1.77.2.39
@@ -2006,7 +2006,8 @@
 		if ($sock) {
 			close($sock);
 		} else {
-			die(); #socket attempt failed immediately (not timeout)
+			alarm 0; # Cancel the alarm
+			die("Socket Connect Failed");
 		}
 		&ld_debug(3, "Connected to $1 (port $port)");
 		alarm 0; # Cancel the alarm
@@ -2042,7 +2043,8 @@
 		my $sock = &ld_open_socket($$r{server}, $sip_d_port, 
 					$$v{protocol});
 		unless ($sock) {
-			die(); #socket attempt failed immediately (not timeout)
+			alarm 0;
+			die("Socket Connect Failed");
 		}
 
 		my $sip_sockaddr = getsockname($sock);
