async_run

Reviewers: ivica

Reviewed By: ivica

Subscribers: korina

Differential Revision: https://repo.mireo.local/D27342
This commit is contained in:
Bruno Iljazovic
2024-01-16 13:18:21 +01:00
parent 2f6751d162
commit 4f87b27861
29 changed files with 398 additions and 85 deletions
+2 -2
View File
@@ -57,7 +57,7 @@ void test_receive_malformed_packet(
using client_type = mqtt_client<test::test_stream>;
client_type c(executor, "");
c.brokers("127.0.0.1,127.0.0.1") // to avoid reconnect backoff
.run();
.async_run(asio::detached);
asio::steady_timer timer(c.get_executor());
timer.expires_after(std::chrono::milliseconds(100));
@@ -136,7 +136,7 @@ BOOST_AUTO_TEST_CASE(receive_disconnect) {
using client_type = mqtt_client<test::test_stream>;
client_type c(executor, "");
c.brokers("127.0.0.1,127.0.0.1") // to avoid reconnect backoff
.run();
.async_run(asio::detached);
asio::steady_timer timer(c.get_executor());
timer.expires_after(std::chrono::milliseconds(100));