Description
boost::redis::request::config has four member variables.
I want to know the behavior of cancel or not cancel.
I assume that redis server is running, and async_run()
is called with reconnect_wait_interval 10 seconds.
Case1: async_exec during disconnected
- restart redis server by systemctl. (server restarts immediately)
- User calls asnyc_exec
- 10 seconds later from step1 Boost.Redis reconnect to the server
- CompletionHandler of step2 is invoked if cancel_if_not_connected is false, otherwise the request step2 is cancelled.
I tested it by my enviromnent, and works as above. It is expected behavior for me.
Case2: disconnect after async_exec called but not completion handler is invoked.
- User calls asnyc_exec
- restart redis server by systemctl. (server restarts immediately)
- 10 seconds later from step2 Boost.Redis reconnect to the server
- ???
I am looking for the way that Boost.Redis resends step1 request to the server and receives the response and then, invoke the completion handler of the step1. So the user doesn't need to care about disconnection/resending.
I guess that boost::redis::request::config
member cancel_if_unresponded
and cancel_on_connection_lost
are related.
If I set cancel_on_connection_lost = false
, Does Boost.Redis resend the request of step1 automatically ?
Additional question: Is cancel_if_unresponded
related to the situation?