Skip to content

Commit

Permalink
fix: πŸ› try to stop grpcStream evenif grpcClient does not exist
Browse files Browse the repository at this point in the history
1. grpcStream method will not fail even if stream does not exist; 2.
grpcStream might exist even if grpcClient does not

βœ… Closes: #172
  • Loading branch information
hcfw007 committed Oct 25, 2021
1 parent 2a8b397 commit e0118c2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/client/puppet-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,9 @@ export class PuppetService extends Puppet {
}
}

this.stopGrpcStream()
if (this.grpcClient) {
try {
this.stopGrpcStream()

await util.promisify(
this.grpcClient.stop
.bind(this.grpcClient)
Expand Down

0 comments on commit e0118c2

Please sign in to comment.