I am trying to get the connection state for a GRPC (Java API) connection via the call copied below. Based on the notes I could find online, it seemed as if GRPC client would lazily connect to the server on the first service call & if I wanted to establish the connection before the service call, I could use this option. However, this call seems to always prevent my application from connecting to the server and I was wondering if I had to rely on a different call/mechanism.
GRPC version: 1.1.2
JDK version:1.8
final ManagedChannelBuilder<?> channelBuilder = connection.getSecure(); //this forms a secure connection
channel = channelBuilder.build();
ConnectivityState connectivityState = channel.getState(true); //referenced in question above
asyncStub = MonetaGoConnectGrpc.newStub(channel);