Closed Siltnamis closed 2 years ago
Yes that’s right. It’s possible to change the implementation to reuse the same client, but it wouldn’t really much different at all in terms of performance, and could possibly introduce bugs. So I don’t think it’s worth making a change.
Thanks for the question! I should make this kind of thing more obvious in the docs.
Going to close this issue, but feel free to comment or re-open it if needed!
Hi, is there a way to use the same
client_t
to retry connecting to the same set of servers after client state becomesCN_CLIENT_STATE_CONNECTION_REQUEST_TIMED_OUT
? Scenario: Server is down client tries to connect withcn_client_connect
client reaches timeout Server goes up client tries to connect withcn_client_connect
cn_client_state_t
never changes fromCN_CLIENT_STATE_CONNECTION_REQUEST_TIMED_OUT
even ifcn_client_disconnect
is called.In this case should I destroy the client and create a new one?