X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Fnfs%2Fconn.c;h=9b98682e4e7d08a471c049cdbb0b51d31ed720c1;hp=29dbb82c33dd102d3e90d0d0dcb223f7f7bc9c25;hb=2bb403d1547790e731e5b151f9ef41880a6eb6c7;hpb=7f9343a38c031d9cc61a6bc7e06df519b16d1293 diff --git a/support/nfs/conn.c b/support/nfs/conn.c index 29dbb82..9b98682 100644 --- a/support/nfs/conn.c +++ b/support/nfs/conn.c @@ -200,6 +200,14 @@ CLIENT *mnt_openclnt(clnt_addr_t *mnt_server, int *msock) /* contact the mount daemon via TCP */ mnt_saddr->sin_port = htons((u_short)mnt_pmap->pm_port); *msock = get_socket(mnt_saddr, mnt_pmap->pm_prot, TRUE, FALSE); + if (*msock == RPC_ANYSOCK) { + if (rpc_createerr.cf_error.re_errno == EADDRINUSE) + /* Probably in-use by a TIME_WAIT connection, + * It is worth waiting a while and trying again. + */ + rpc_createerr.cf_stat = RPC_TIMEDOUT; + return NULL; + } switch (mnt_pmap->pm_prot) { case IPPROTO_UDP: