Comments (2)
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.
from redis.
Above I mean the flag boost::redis::request::config::cancel_if_not_connected
.
Does that solve your problem? do your need any further help?
from redis.
Related Issues (20)
- No way to specify CA/client certificate for SSL connections. HOT 10
- Where to reinstate SSL verification spec? HOT 4
- Redis client fails to process all the requests. HOT 30
- How to use cmake or link an example? HOT 5
- Windows Visual Studio 2022 C++17/C++20 failed compilation of src.hpp. HOT 14
- Are distinct connection objects thread safe ? HOT 24
- How to treat well return nothing lua function ? HOT 2
- Question about boost::redis::request::config HOT 17
- second call to async_exec hangs and never returns HOT 4
- Modular Boost C++ Libraries Request HOT 1
- boost.redis HOT 1
- Unable to run example files after building Boost 1.84.0. HOT 1
- Win32 build error: narrowing conversion
- Setup a Redis server with TLS support to use in the CI tests HOT 6
- [docs] Navigation panel improperly rendered HOT 5
- connection lost sporadically HOT 6
- conn->cancel does not close socket correctly on linux HOT 3
- Problem with installation HOT 3
- async_exec never returns with server down HOT 2
- resolve addresses The specified class was not found HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redis.