diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2009-07-14 16:18:37 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2009-07-14 16:18:37 -0400 |
commit | d0280c201a47cce4aadcfa610b8e03865cce5c5e (patch) | |
tree | f837058cefba41b543b52d118ad61d3ea5b10d66 /support | |
parent | 56a1b590d2f60e62feb3589a7b5b6fab2fed75f7 (diff) | |
download | nfs-utils-d0280c201a47cce4aadcfa610b8e03865cce5c5e.tar.gz nfs-utils-d0280c201a47cce4aadcfa610b8e03865cce5c5e.tar.xz nfs-utils-d0280c201a47cce4aadcfa610b8e03865cce5c5e.zip |
support: Set proper retransmit timeout for datagram transports
Instead of setting the total timeout and the retransmit timeout to the
same value for datagram transports, use a 1 second retransmit timeout,
so we actually get a retransmit or two before failing.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support')
-rw-r--r-- | support/nfs/rpc_socket.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/support/nfs/rpc_socket.c b/support/nfs/rpc_socket.c index a2255c3..ac4e6d8 100644 --- a/support/nfs/rpc_socket.c +++ b/support/nfs/rpc_socket.c @@ -326,7 +326,9 @@ static CLIENT *nfs_get_udpclient(const struct sockaddr *sap, version, *timeout, &sock); #endif /* !HAVE_LIBTIRPC */ if (client != NULL) { - CLNT_CONTROL(client, CLSET_RETRY_TIMEOUT, (char *)timeout); + struct timeval retry_timeout = { 1, 0 }; + CLNT_CONTROL(client, CLSET_RETRY_TIMEOUT, + (char *)&retry_timeout); CLNT_CONTROL(client, CLSET_FD_CLOSE, NULL); } else (void)close(sock); |