diff --git a/examples/node/xds/greeter_client.js b/examples/node/xds/greeter_client.js index d12b082f197..986a38fd4ca 100644 --- a/examples/node/xds/greeter_client.js +++ b/examples/node/xds/greeter_client.js @@ -53,7 +53,9 @@ function main() { user = 'world'; } client.sayHello({name: user}, function(err, response) { + if (err) throw err; console.log('Greeting:', response.message); + client.close(); }); }