From: Chuck Lever Date: Tue, 14 Jul 2009 20:18:37 +0000 (-0400) Subject: support: Set proper retransmit timeout for datagram transports X-Git-Tag: nfs-utils-1-2-1-rc2~24 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=d0280c201a47cce4aadcfa610b8e03865cce5c5e;p=nfs-utils.git 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 Signed-off-by: Steve Dickson --- 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);