Skip to content

Commit

Permalink
GRPC: Adds peer socket address when the client call is ready (#7451)
Browse files Browse the repository at this point in the history
Closes
#7445
  • Loading branch information
anuragagarwal561994 authored Jan 2, 2023
1 parent fe540ea commit 390803d
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ public <REQUEST, RESPONSE> ClientCall<REQUEST, RESPONSE> interceptCall(
}
}

request.setPeerSocketAddress(result.getAttributes().get(Grpc.TRANSPORT_ATTR_REMOTE_ADDR));

return new TracingClientCall<>(result, parentContext, context, request);
}

Expand Down Expand Up @@ -163,6 +161,7 @@ public void onClose(Status status, Metadata trailers) {
@Override
public void onReady() {
try (Scope ignored = context.makeCurrent()) {
request.setPeerSocketAddress(getAttributes().get(Grpc.TRANSPORT_ATTR_REMOTE_ADDR));
delegate().onReady();
}
}
Expand Down

0 comments on commit 390803d

Please sign in to comment.