You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some application will need to be able to check if initial connection to the server succeeded before sending any traffic to it.
in other words, how can an app detect if the connection is up before trying to execute an exec() call?
The text was updated successfully, but these errors were encountered:
The best way to check if a connection is up is by sending executing a command like PING with exec() command. In principle it is possible to check if the socket is open, but that is not as reliable. My recommendation however is for users to rely on the buil-in health-checker in Boost.Redis instead of trying to detect themselves. The health-checker is capable of establishing a new connection (to the same instance) when necessary.
Also, I recommend you having a look at redis::request::config to adjust the behaviour to your needs, the flag cancel_if_not_connected seems to be what you are looking for.
Some application will need to be able to check if initial connection to the server succeeded before sending any traffic to it.
in other words, how can an app detect if the connection is up before trying to execute an exec() call?
The text was updated successfully, but these errors were encountered: