thread-safe client

Reviewers: ivica

Reviewed By: ivica

Subscribers: korina

Differential Revision: https://repo.mireo.local/D26864
This commit is contained in:
Bruno Iljazovic
2023-12-07 12:18:28 +01:00
parent e849166599
commit e0a0bafbf1
8 changed files with 68 additions and 10 deletions

View File

@@ -66,10 +66,10 @@ public:
static_cast<uint8_t>(_context.reason_code), _context.props
);
send_disconnect(std::move(disconnect));
asio::dispatch(asio::prepend(std::move(*this), std::move(disconnect)));
}
void send_disconnect(control_packet<allocator_type> disconnect) {
void operator()(control_packet<allocator_type> disconnect) {
const auto& wire_data = disconnect.wire_data();
_svc_ptr->async_send(