Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue 632 (double execution of callback) #695

Merged
merged 3 commits into from
Jan 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion javascript/net/grpc/web/grpcwebclientreadablestream.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ const GrpcWebClientReadableStream = function(genericTransportInterface) {
});
errorEmitted = true;
}
if (self.onStatusCallback_) {
if (!errorEmitted && self.onStatusCallback_) {
self.onStatusCallback_(/** @type {!Status} */ ({
code: Number(grpcStatusCode),
details: grpcStatusMessage,
Expand Down
2 changes: 1 addition & 1 deletion net/grpc/gateway/examples/echo/node-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"@grpc/proto-loader": "^0.3.0",
"async": "^1.5.2",
"google-protobuf": "^3.6.0",
"@grpc/grpc-js": "^0.5.0",
"grpc": "^1.24.0",
"lodash": "^4.6.1"
}
}
2 changes: 1 addition & 1 deletion net/grpc/gateway/examples/echo/node-server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var PROTO_PATH = __dirname + '/../echo.proto';
var assert = require('assert');
var async = require('async');
var _ = require('lodash');
var grpc = require('@grpc/grpc-js');
var grpc = require('grpc');
var protoLoader = require('@grpc/proto-loader');
var packageDefinition = protoLoader.loadSync(
PROTO_PATH,
Expand Down