Fix switched condition in channel code

This commit is contained in:
murgatroid99 2018-08-13 17:01:28 -07:00
parent 94f059ae21
commit ecb84dafb2

View File

@ -213,9 +213,9 @@ export class Http2Channel extends EventEmitter implements Channel {
private readonly options: Partial<ChannelOptions>) {
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']) {