You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2020/04/26 08:22:48 UTC
[GitHub] [incubator-brpc] cstarc commented on issue #1097: Stream 的on_received_messages怎么进行错误处理?
cstarc commented on issue #1097:
URL: https://github.com/apache/incubator-brpc/issues/1097#issuecomment-619508088
> 这个是需要用户实现的callback,返回值是自己填的啊。如果是连接断了的话,应该是on_error会被调用
返回值自己填的清楚,但这个是返回哪里? 客户端怎么通过函数或变量获取这个返回值?
找了下代码on_received_messages 没有处理返回值
```
class MessageBatcher {
void flush() {
if (_size > 0 && _s->_options.handler != NULL) {
_s->_options.handler->on_received_messages(
_s->id(), _storage, _size);
}
for (size_t i = 0; i < _size; ++i) {
delete _storage[i];
}
_size = 0;
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org