From b836b36777519e53d9d6e1ab761324d65903d4fd Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Fri, 14 Jun 2019 08:47:37 -0700 Subject: [PATCH] core: Fix FINE deadline logging We were logging when withDeadline() was used, not when the Context was used. As discovered while looking at https://stackoverflow.com/q/56593692/4690866 . In e19e8f7d updateTimeoutHeaders was removed and logIfContextNarrowedTimeout was called directly. However, the two methods had reverse ordering of callDeadine/outerCallDeadline and the caller did not get their arguments swapped. --- core/src/main/java/io/grpc/internal/ClientCallImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/io/grpc/internal/ClientCallImpl.java b/core/src/main/java/io/grpc/internal/ClientCallImpl.java index ff9e930d81..7e4d8a8246 100644 --- a/core/src/main/java/io/grpc/internal/ClientCallImpl.java +++ b/core/src/main/java/io/grpc/internal/ClientCallImpl.java @@ -248,7 +248,7 @@ final class ClientCallImpl extends ClientCall { boolean deadlineExceeded = effectiveDeadline != null && effectiveDeadline.isExpired(); if (!deadlineExceeded) { logIfContextNarrowedTimeout( - effectiveDeadline, callOptions.getDeadline(), context.getDeadline()); + effectiveDeadline, context.getDeadline(), callOptions.getDeadline()); if (retryEnabled) { stream = clientTransportProvider.newRetriableStream(method, callOptions, headers, context); } else {