From ecb84dafb2ceccf08eca683ddeadedc47a6c322c Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 13 Aug 2018 17:01:28 -0700 Subject: [PATCH] Fix switched condition in channel code --- packages/grpc-js-core/src/channel.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/grpc-js-core/src/channel.ts b/packages/grpc-js-core/src/channel.ts index e0b1a240..5c1b2d25 100644 --- a/packages/grpc-js-core/src/channel.ts +++ b/packages/grpc-js-core/src/channel.ts @@ -213,9 +213,9 @@ export class Http2Channel extends EventEmitter implements Channel { private readonly options: Partial) { super(); if (credentials.isSecure()) { - this.target = new url.URL(`http://${address}`); - } else { this.target = new url.URL(`https://${address}`); + } else { + this.target = new url.URL(`http://${address}`); } // TODO(murgatroid99): Add more centralized handling of channel options if (this.options['grpc.default_authority']) {