mirror of https://github.com/grpc/grpc-node.git
grpc-js: Throw in watchConnectivityState if channel is closed
This commit is contained in:
parent
b374a83a71
commit
602fcd23b4
|
@ -480,6 +480,9 @@ export class ChannelImplementation implements Channel {
|
|||
deadline: Date | number,
|
||||
callback: (error?: Error) => void
|
||||
): void {
|
||||
if (this.connectivityState === ConnectivityState.SHUTDOWN) {
|
||||
throw new Error('Channel has been shut down');
|
||||
}
|
||||
let timer = null;
|
||||
if(deadline !== Infinity) {
|
||||
const deadlineDate: Date =
|
||||
|
|
Loading…
Reference in New Issue