From d0280c201a47cce4aadcfa610b8e03865cce5c5e Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Tue, 14 Jul 2009 16:18:37 -0400 Subject: [PATCH] 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 --- support/nfs/rpc_socket.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.39.5