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

support handle on_received_messages failure of streaming rpc #1804

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yangzhg
Copy link
Member

@yangzhg yangzhg commented Jun 17, 2022

closed #1803

support handle on_received_messages failure of streaming rpc, user can overload on_failure of StreamInputHandler to handle on_received_messages failure, the default is do nothing

_s->id(), _storage, _size);
if (BAIDU_UNLIKELY(ret != 0)) {
LOG(WARNING) << "Fail to receive message for stream: " << _s->id();
_s->_options.handler->on_failure(_s->id());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's unnecessary to call on_failure here. Since user knows what will return from on_received_messages, they can call on_failure in on_received_messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request for support streaming RPC data receive failure handling
2 participants