diff options
-rw-r--r-- | src/node/src/client.js | 2 | ||||
-rw-r--r-- | src/node/test/surface_test.js | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/node/src/client.js b/src/node/src/client.js index 0cd29e5b95..d14713f393 100644 --- a/src/node/src/client.js +++ b/src/node/src/client.js @@ -575,7 +575,7 @@ exports.makeClientConstructor = function(methods, serviceName) { if (err) { callback(new Error('Failed to connect before the deadline')); } - var new_state = this.channel.getConnectivityState(true); + var new_state = self.channel.getConnectivityState(true); if (new_state === grpc.connectivityState.READY) { callback(); } else if (new_state === grpc.connectivityState.FATAL_FAILURE) { diff --git a/src/node/test/surface_test.js b/src/node/test/surface_test.js index b0f3aa4b38..098905e74b 100644 --- a/src/node/test/surface_test.js +++ b/src/node/test/surface_test.js @@ -139,7 +139,7 @@ describe('Client#$waitForReady', function() { var client; before(function() { server = new grpc.Server(); - port = server.bind('localhost:0'); + port = server.bind('localhost:0', grpc.ServerCredentials.createInsecure()); server.start(); Client = surface_client.makeProtobufClientConstructor(mathService); }); @@ -173,7 +173,6 @@ describe('Client#$waitForReady', function() { assert.ifError(error); done(); }); - client.$tryConnect(); }); it('should complete if called when already ready', function(done) { client.$waitForReady(Infinity, function(error) { @@ -183,7 +182,6 @@ describe('Client#$waitForReady', function() { done(); }); }); - client.$tryConnect(); }); }); describe('Echo service', function() { |