Fix spelling error, make narrower cast in dereference

This commit is contained in:
murgatroid99 2018-08-03 14:28:40 -07:00
parent 500642b5ac
commit 2c0359f230
2 changed files with 3 additions and 3 deletions

View File

@ -43,7 +43,7 @@ export interface ChannelOptions {
'grpc.primary_user_agent': string;
'grpc.secondary_user_agent': string;
'grpc.default_authority': string;
'grpc.keealive_time_ms': number;
'grpc.keepalive_time_ms': number;
'grpc.keepalive_timeout_ms': number;
[key: string]: string|number;
}

View File

@ -61,10 +61,10 @@ export class Http2SubChannel extends EventEmitter implements SubChannel {
this.userAgent = userAgent;
if (channelArgs['grpc.keepalive_time_ms']) {
this.keepaliveTimeMs = channelArgs['grpc.keepalive_time_ms'] as number;
this.keepaliveTimeMs = channelArgs['grpc.keepalive_time_ms']!;
}
if (channelArgs['grpc.keepalive_timeout_ms']) {
this.keepaliveTimeoutMs = channelArgs['grpc.keepalive_timeout_ms'] as number;
this.keepaliveTimeoutMs = channelArgs['grpc.keepalive_timeout_ms']!;
}
this.keepaliveIntervalId = setTimeout(() => {}, 0);
clearTimeout(this.keepaliveIntervalId);