async_run

Reviewers: ivica

Reviewed By: ivica

Subscribers: korina

Differential Revision: https://repo.mireo.local/D27342
This commit is contained in:
Bruno Iljazovic committed 2024-01-16 13:18:21 +01:00
1 parent 2f6751d162
commit 4f87b27861
29 files changed
+398 -85

No files matched your search

+2 -1
View File
@@ -2,6 +2,7 @@
#define ASYNC_MQTT5_TEST_PACKET_UTIL_HPP
#include <string>
#include <bitset>
#include <async_mqtt5/detail/control_packet.hpp>
@@ -89,7 +90,7 @@ inline std::string to_readable_packet(std::string packet) {
auto& [topic, packet_id, flags, props, payload] = *publish;
stream << code_to_str(code);
stream << (packet_id ? " " + std::to_string(*packet_id) : "");
stream << "flags: " << flags;
stream << " flags: " << std::bitset<8>(flags);
return stream.str();
}
+5 -3
View File
@@ -155,8 +155,8 @@ public:
stream << "Packet mismatch! Expected: "
<< to_readable_packet(expected[i])
<< " Received: "
<< to_readable_packet(std::string((const char*)it->data(), len));
log(stream.str());
<< to_readable_packet(std::string((const char*)it->data(), it->size()));
BOOST_CHECK_MESSAGE(false, stream.str());
}
}
}
@@ -235,7 +235,9 @@ public:
private:
void shutdown() override { }
void shutdown() override {
_pending_read.complete(get_executor(), asio::error::operation_aborted, 0);
}
void launch_broker_ops() {
for (auto& op: _broker_side.pop_broker_ops(get_executor())) {