chenBright commented on code in PR #3359:
URL: https://github.com/apache/brpc/pull/3359#discussion_r3485723765
##########
src/brpc/selective_channel.cpp:
##########
@@ -306,14 +306,20 @@ Sender::Sender(Controller* cntl,
int Sender::IssueRPC(int64_t start_realtime_us) {
_main_cntl->_current_call.need_feedback = false;
+ ChannelBalancer* balancer =
+ static_cast<ChannelBalancer*>(_main_cntl->_lb.get());
+ if (balancer == NULL) {
+ _main_cntl->SetFailed(ECANCELED,
+ "SelectiveChannel balancer is unavailable");
+ return -1;
+ }
Review Comment:
The problem seems unresolved. The process still crashes even if the balancer
is deleted by main_cntl after the if statement.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]