Skip to content

Commit 6161950

Browse files
committed
Merge remote-tracking branch 'upstream/@grpc/[email protected]' into grpc-js_1.3_upmerge
2 parents bd1571f + 4d69637 commit 6161950

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

packages/grpc-js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@grpc/grpc-js",
3-
"version": "1.3.5",
3+
"version": "1.3.6",
44
"description": "gRPC Library for Node - pure JS implementation",
55
"homepage": "https://grpc.io/",
66
"repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",

packages/grpc-js/src/http_proxy.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,12 @@ export function getProxiedConnection(
256256
reject();
257257
});
258258
} else {
259+
trace(
260+
'Successfully established a plaintext connection to ' +
261+
options.path +
262+
' through proxy ' +
263+
proxyAddressString
264+
);
259265
resolve({
260266
socket,
261267
realTarget: parsedTarget,

packages/grpc-js/src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,10 @@ import * as resolver_ip from './resolver-ip';
258258
import * as load_balancer_pick_first from './load-balancer-pick-first';
259259
import * as load_balancer_round_robin from './load-balancer-round-robin';
260260

261+
const clientVersion = require('../../package.json').version;
262+
261263
(() => {
264+
logging.trace(LogVerbosity.DEBUG, 'index', 'Loading @grpc/grpc-js version ' + clientVersion);
262265
resolver_dns.setup();
263266
resolver_uds.setup();
264267
resolver_ip.setup();

packages/grpc-js/src/subchannel.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,11 @@ export class Subchannel {
266266
}
267267

268268
private createSession(proxyConnectionResult: ProxyConnectionResult) {
269+
if (proxyConnectionResult.realTarget) {
270+
trace(this.subchannelAddressString + ' creating HTTP/2 session through proxy to ' + proxyConnectionResult.realTarget);
271+
} else {
272+
trace(this.subchannelAddressString + ' creating HTTP/2 session');
273+
}
269274
const targetAuthority = getDefaultAuthority(
270275
proxyConnectionResult.realTarget ?? this.channelTarget
271276
);
@@ -368,6 +373,7 @@ export class Subchannel {
368373
});
369374
session.once('close', () => {
370375
if (this.session === session) {
376+
trace(this.subchannelAddressString + ' connection closed');
371377
this.transitionToState(
372378
[ConnectivityState.CONNECTING],
373379
ConnectivityState.TRANSIENT_FAILURE

0 commit comments

Comments
 (0)