Merge remote-tracking branch 'upstream/@grpc/grpc-js@1.3.x' into grpc-js_1.3_upmerge

This commit is contained in:
Michael Lumish 2021-07-19 13:44:05 -07:00
commit 6161950a85
4 changed files with 16 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@grpc/grpc-js",
"version": "1.3.5",
"version": "1.3.6",
"description": "gRPC Library for Node - pure JS implementation",
"homepage": "https://grpc.io/",
"repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",

View File

@ -256,6 +256,12 @@ export function getProxiedConnection(
reject();
});
} else {
trace(
'Successfully established a plaintext connection to ' +
options.path +
' through proxy ' +
proxyAddressString
);
resolve({
socket,
realTarget: parsedTarget,

View File

@ -258,7 +258,10 @@ import * as resolver_ip from './resolver-ip';
import * as load_balancer_pick_first from './load-balancer-pick-first';
import * as load_balancer_round_robin from './load-balancer-round-robin';
const clientVersion = require('../../package.json').version;
(() => {
logging.trace(LogVerbosity.DEBUG, 'index', 'Loading @grpc/grpc-js version ' + clientVersion);
resolver_dns.setup();
resolver_uds.setup();
resolver_ip.setup();

View File

@ -266,6 +266,11 @@ export class Subchannel {
}
private createSession(proxyConnectionResult: ProxyConnectionResult) {
if (proxyConnectionResult.realTarget) {
trace(this.subchannelAddressString + ' creating HTTP/2 session through proxy to ' + proxyConnectionResult.realTarget);
} else {
trace(this.subchannelAddressString + ' creating HTTP/2 session');
}
const targetAuthority = getDefaultAuthority(
proxyConnectionResult.realTarget ?? this.channelTarget
);
@ -368,6 +373,7 @@ export class Subchannel {
});
session.once('close', () => {
if (this.session === session) {
trace(this.subchannelAddressString + ' connection closed');
this.transitionToState(
[ConnectivityState.CONNECTING],
ConnectivityState.TRANSIENT_FAILURE