-
Notifications
You must be signed in to change notification settings - Fork 271
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
ClientChannel has no way to trigger a connection to the server if no RPC is being invoked #723
Comments
The method To answer your questions:
|
@mosuem thanks for the answer. I think there are arguments in favor of being able to trigger a channel to connect.
My experience with the C++ implementation of grpc is that once you create a channel, the channel is the connection. you do not have to do anything in order to make it connect or recover from a lost connection.
|
This would mean more than just connecting on channel creation - it means periodically sending requests, checking if one goes through, and then doing something.
Again, this means that the connection needs to be tested somehow. Maybe KEEPALIVE pings might help with your use case? Otherwise, I still think that having a special message in your protocol could solve this. |
@mosuem I have the keep alive mechanism in place, but still no recovery in case we have a lost connection. |
More documentation is always better! Could you send a PR? I am happy to review it. |
When using grpc C++, creating a channel immediately creates a connection to the server. I can monitor the ConnectionState and make sure I have a valid connection to the server.
However, when using dart, I could not find a way to force the channel to connect.
It seems that unless I am explicitly call to one of the stub RPC methods, the channel
onConnectionStateChanged
event is never triggered.Questions:
The text was updated successfully, but these errors were encountered: