mirror of https://github.com/grpc/grpc-java.git
core: Avoid frequently computing inprocess useragent
This commit is contained in:
parent
11b5c1a7c1
commit
2ea77cce1e
|
@ -87,7 +87,7 @@ final class InProcessTransport implements ServerTransport, ConnectionClientTrans
|
|||
public InProcessTransport(String name, String authority, String userAgent) {
|
||||
this.name = name;
|
||||
this.authority = authority;
|
||||
this.userAgent = userAgent;
|
||||
this.userAgent = GrpcUtil.getGrpcUserAgent("inprocess", userAgent);
|
||||
}
|
||||
|
||||
@CheckReturnValue
|
||||
|
@ -146,9 +146,7 @@ final class InProcessTransport implements ServerTransport, ConnectionClientTrans
|
|||
}
|
||||
};
|
||||
}
|
||||
headers.put(
|
||||
GrpcUtil.USER_AGENT_KEY,
|
||||
GrpcUtil.getGrpcUserAgent("inprocess", userAgent));
|
||||
headers.put(GrpcUtil.USER_AGENT_KEY, userAgent);
|
||||
return new InProcessStream(method, headers, callOptions, authority).clientStream;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue