mirror of
https://github.com/boostorg/redis.git
synced 2026-01-19 04:42:09 +00:00
Changes cancel_on_connection_lost default to false and deprecates it (#329)
* Changes cancel_on_connection_lost default to false * Deprecates cancel_on_connection_lost and cancel_if_not_connected * Fixes a TODO in test_conn_exec_cancel close #323
This commit is contained in:
committed by
GitHub
parent
35fa68b926
commit
28ed27ce72
@@ -101,7 +101,7 @@ void test_error_code()
|
||||
|
||||
// This request will complete after the health checker deems the connection
|
||||
// as unresponsive and triggers a reconnection (it's configured to be cancelled
|
||||
// on connection lost).
|
||||
// if unresponded).
|
||||
conn.async_exec(req, ignore, [&](error_code ec, std::size_t) {
|
||||
exec_finished = true;
|
||||
BOOST_TEST_EQ(ec, net::error::operation_aborted);
|
||||
|
||||
@@ -39,10 +39,6 @@ using boost::redis::logger;
|
||||
using boost::redis::connection;
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
// TODO: replace this by connection once it supports asio::cancel_after
|
||||
// See https://github.com/boostorg/redis/issues/226
|
||||
using connection_type = boost::redis::basic_connection<net::any_io_executor>;
|
||||
|
||||
namespace {
|
||||
|
||||
// We can cancel requests that haven't been written yet.
|
||||
@@ -95,7 +91,7 @@ void test_cancel_written()
|
||||
{
|
||||
// Setup
|
||||
net::io_context ctx;
|
||||
connection_type conn{ctx};
|
||||
connection conn{ctx};
|
||||
auto cfg = make_test_config();
|
||||
cfg.health_check_interval = std::chrono::seconds::zero();
|
||||
bool run_finished = false, exec1_finished = false, exec2_finished = false,
|
||||
|
||||
Reference in New Issue
Block a user