mirror of
https://github.com/boostorg/mqtt5.git
synced 2025-11-14 14:40:01 +01:00
Better test packet logging & validation
Summary: related to T12015, T11798 - improved packet logging in test broker for easier debugging - test broker will fail the test if a packet is sent after all the messages were exchanged - fixed a bug in assemble_op where read buffer was not properly cleared if an error occurred (for example, malformed packet cases) Reviewers: ivica Reviewed By: ivica Subscribers: iljazovic, miljen Differential Revision: https://repo.mireo.local/D27561
This commit is contained in:
@@ -197,8 +197,8 @@ private:
|
||||
return perform(wait_for, asio::transfer_at_least(0));
|
||||
|
||||
bool is_reply = code != control_code_e::publish &&
|
||||
code != control_code_e::auth &&
|
||||
code != control_code_e::disconnect;
|
||||
code != control_code_e::auth &&
|
||||
code != control_code_e::disconnect;
|
||||
|
||||
if (is_reply) {
|
||||
auto packet_id = decoders::decode_packet_id(first).value();
|
||||
@@ -213,6 +213,8 @@ private:
|
||||
error_code ec, uint8_t control_code,
|
||||
byte_citer first, byte_citer last
|
||||
) {
|
||||
if (ec)
|
||||
_data_span = { _read_buff.cend(), _read_buff.cend() };
|
||||
std::move(_handler)(ec, control_code, first, last);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user