]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
If the user calls rx_EndCall and we still have an outstanding
authorNickolai Zeldovich <kolya@mit.edu>
Sun, 13 Oct 2002 10:01:02 +0000 (10:01 +0000)
committerNickolai Zeldovich <kolya@mit.edu>
Sun, 13 Oct 2002 10:01:02 +0000 (10:01 +0000)
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

index ff76ec89f9e744391de99e03bdd8341b416c8395..54f0c79e18d5d6d275ed907a2f0d80679c30b3a7 100644 (file)
@@ -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