aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/node/interop/interop_client.js6
-rw-r--r--src/node/src/client.js4
2 files changed, 4 insertions, 6 deletions
diff --git a/src/node/interop/interop_client.js b/src/node/interop/interop_client.js
index 80f811901c..455055d9f3 100644
--- a/src/node/interop/interop_client.js
+++ b/src/node/interop/interop_client.js
@@ -154,13 +154,15 @@ function serverStreaming(client, done) {
arg.response_parameters[resp_index].size);
resp_index += 1;
});
- call.on('status', function(status) {
- assert.strictEqual(status.code, grpc.status.OK);
+ call.on('end', function() {
assert.strictEqual(resp_index, 4);
if (done) {
done();
}
});
+ call.on('status', function(status) {
+ assert.strictEqual(status.code, grpc.status.OK);
+ });
}
/**
diff --git a/src/node/src/client.js b/src/node/src/client.js
index efec05bbf3..65339406b2 100644
--- a/src/node/src/client.js
+++ b/src/node/src/client.js
@@ -125,10 +125,6 @@ function _read(size) {
self.finished = true;
return;
}
- if (self.finished) {
- self.push(null);
- return;
- }
var data = event.read;
if (self.push(self.deserialize(data)) && data !== null) {
var read_batch = {};