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

Allow multiple .on() callbacks and fix issue with non-OK status #847

Merged
merged 1 commit into from
Jun 10, 2020

Conversation

stanley-cheung
Copy link
Collaborator

Fixes #632
Fixes #292

This fixes the issue where calling .on(<event>, callback) to set a callback should have added the callback to listen to <event>, instead of overriding the existing one. This PR also adds a .removeListener(<event>, callback) method to allow removing a callback.

Fixed #786

This fixes the issue where, in unary calls, we should not have sent the data/response back up, if the rpc ended with a non-OK grpc status. See the linked comment from #786 for more details.

This PR also added tests for all the above scenarios.

@stanley-cheung stanley-cheung merged commit 6900db2 into grpc:master Jun 10, 2020
@stanley-cheung stanley-cheung changed the title Fix issues with callbacks Allow multiple callbacks and fix issue with non-OK status Jun 10, 2020
@stanley-cheung stanley-cheung deleted the unary-non-ok-response branch June 10, 2020 00:40
@stanley-cheung stanley-cheung changed the title Allow multiple callbacks and fix issue with non-OK status Allow multiple .on() callbacks and fix issue with non-OK status Jun 12, 2020
borissmidt pushed a commit to borissmidt/grpc-web that referenced this pull request Feb 16, 2022
* Replace prototool with buf

* Remove dep tooling references

* Update protoc and buf versions

* Add CI test to ensure files are consistently generated

* Update Go version to 1.16

* Remove dependencies added by tool installs in CI

* Update module file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant