I'm working on a async client that keeps on sending tasks to servers. To make it efficient and fail-tolerant, I maintain server status by constantly checking if the channel is working.
However, for all channel query apis, I've tried
channel::GetState(), channel::WaitForConnnected(T deadline), etc...
All of them gives segfault after multiple queries.
Does anyone know why? And how should I query about channel connectivity or server up/down info?
My goal here is to know if that server is later up so that I can distribute tasks to it. I understand that I can simply keep sending messages to potentially up servers and grpc will keep reconnecting if the server is down. But I keep tasks as a pool and send the task while removing it from the pool. And later if deadline is exceeded, I will then added back to the pool. So if I keep sending the task to an already-known-failed server, I would waste time resources by keep sending tasks. So any other idea for implementing this?
I'm not sure if I can my points clearly. My project is kind of involved and yet I'm a newbie to this area, sorry and thanks for reading!!