Description
Hi,
I'm planning to replace my redis connection with boost.redis using coroutines. I was testing the code bellow but I noticed that it aways freezes at the second call to async_exec. Any idea what I'm doing wrong? My plan is to keep the connection to the database open and re-use it always when is necessary.
auto
receiver(std::shared_ptr conn) -> asio::awaitable
{
request auth_req;
auth_req.push("AUTH", "my_psw");
boost::redis::responsestd::string auth_resp;
co_await conn->async_exec(auth_req, auth_resp, boost::asio::use_awaitable);
std::cout << "AUTH: " << std::get<0>(auth_resp).value() << std::endl;
std::get<0>(auth_resp).value().clear();
request ping_req;
auth_req.push("PING");
boost::redis::responsestd::string ping_resp;
co_await conn->async_exec(ping_req, ping_resp, boost::asio::use_awaitable);
std::cout << "PING: " << std::get<0>(ping_resp).value() << std::endl;
std::get<0>(ping_resp).value().clear();