Client gRPC connection with reconnect in C++?

Viewed 1339

Is it possible to have a client channel that automatically reconnects? I tried using wait_for_ready(true) on the context, but that doesn't seem to have any effect.

I get this crash when I try to use a client channel with a lost connection:

E0519 12:56:40.239405883    9379 client_context.cc:119]      assertion failed: call_ == nullptr
1 Answers

My problem was attempting to re-use a context. Creating a new context for each attempt fixed the issue.

Related