]> 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>
Thu, 14 Nov 2002 21:32:26 +0000 (21:32 +0000)
committerGarry Zacheiss <zacheiss@mit.edu>
Thu, 14 Nov 2002 21:32:26 +0000 (21:32 +0000)
delayack, force-send it now, to be nice to the server (otherwise
the server will keep retransmitting to us for a while).

(cherry picked from commit 7aebf2b2ea68668482edaefedd4efa5cafa61edd)

src/rx/rx.c

index e6467ce21cc86f3eb4fcc07f32ea132e380eae32..d6b182e8fe32b4d881f7257721112724f8822cec 100644 (file)
@@ -1796,6 +1796,16 @@ afs_int32 rx_EndCall(call, 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