After an RPC over datagram call times out, clnt_dg_call() goes into a
loop, spamming the server with endless retransmits. Since signals
are masked, a ^C doesn't break the loop -- the process must be KILLed.
Add missing logic to exit appropriately after the call's total time
has expired.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
}
send_again:
+ if (total_time <= 0) {
+ cu->cu_error.re_status = RPC_TIMEDOUT;
+ goto out;
+ }
nextsend_time = cu->cu_wait.tv_sec * 1000 + cu->cu_wait.tv_usec / 1000;
if (sendto(cu->cu_fd, cu->cu_outbuf, outlen, 0, sa, salen) != outlen) {
cu->cu_error.re_errno = errno;