简体   繁体   中英

Client gRPC connection with reconnect in C++?

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM