Thank you for replying.
Yes, "WaitForStateChange" is already been added but still, it does not move to READY state..
grpc_connectivity_state channel_state = grpcChannel->GetState(connect);
const int trySeconds = 10;
const int tryInterval = 1;
int tryCnt = 0;
while (channel_state != GRPC_CHANNEL_READY) {
grpcChannel->WaitForStateChange(channel_state, std::chrono::system_clock::now() + std::chrono::seconds(tryInterval));
channel_state = grpcChannel->GetState(connect);
if (++tryCnt > (trySeconds / tryInterval)) {
break;
}
}
Also as per the GRPC doc:
getState() --- "It also accepts a boolean try_to_connect to transition to CONNECTING if the channel is currently IDLE.
The boolean should act as if an RPC occurred" ===> Does this mean it will trigger RPC?
How getState(true) is different/equivalent with the normal RPC call ?
Would sending the actual RPC call would help in moving the channel state from IDLE to READY?
Thank you in advance.
-Regards,
Haripriya