diff options
author | Nathan Straz <nstraz@redhat.com> | 2010-09-28 15:03:30 -0400 |
---|---|---|
committer | Nathan Straz <nstraz@redhat.com> | 2010-09-28 15:03:30 -0400 |
commit | a9b1f95507791f34422084fd47dbf74956902ee1 (patch) | |
tree | b6b81b8114858c82058cd3e0e9de56a17fefd068 /qarsh.c | |
parent | 92a3ae3b8dcf07805a609e7bc19d5fc01b8b1555 (diff) | |
download | qarsh-a9b1f95507791f34422084fd47dbf74956902ee1.tar.gz qarsh-a9b1f95507791f34422084fd47dbf74956902ee1.tar.xz qarsh-a9b1f95507791f34422084fd47dbf74956902ee1.zip |
Wait up to 30 second to establish a connection
The user specified time for holding a connection only.
If the user uses too small a time, like if they are
rebooting a node, the initial connection may fail.
Diffstat (limited to 'qarsh.c')
-rw-r--r-- | qarsh.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -46,6 +46,7 @@ #define QARSH_MINPORT 5010 #define QARSH_BUFSIZE 4096 +#define CONNECT_TIMEOUT 30 /* Globals */ @@ -507,7 +508,7 @@ again: sa.sa_handler = sig_alrm_handler; sigaction(SIGALRM, &sa, NULL); - alarm(max_timeout); + alarm(CONNECT_TIMEOUT); qarsh_fd = connect_to_host(host, port); alarm(0); |