From 7aebf2b2ea68668482edaefedd4efa5cafa61edd Mon Sep 17 00:00:00 2001 From: Nickolai Zeldovich Date: Sun, 13 Oct 2002 10:01:02 +0000 Subject: [PATCH] If the user calls rx_EndCall and we still have an outstanding delayack, force-send it now, to be nice to the server (otherwise the server will keep retransmitting to us for a while). --- src/rx/rx.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/rx/rx.c b/src/rx/rx.c index ff76ec89f..54f0c79e1 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -1764,6 +1764,16 @@ afs_int32 rx_EndCall(register struct rx_call *call, afs_int32 rc) || (call->mode == RX_MODE_RECEIVING && call->rnext == 1)) { (void) rxi_ReadProc(call, &dummy, 1); } + + /* If we had an outstanding delayed ack, be nice to the server + * and force-send it now. + */ + if (call->delayedAckEvent) { + rxevent_Cancel(call->delayedAckEvent, call, RX_CALL_REFCOUNT_DELAY); + call->delayedAckEvent = NULL; + rxi_SendDelayedAck(NULL, call, NULL); + } + /* We need to release the call lock since it's lower than the * conn_call_lock and we don't want to hold the conn_call_lock * over the rx_ReadProc call. The conn_call_lock needs to be held -- 2.39.5