Fix crash when messages are queued

This commit is contained in:
badaix 2020-04-30 10:17:14 +02:00
parent fa0dbfc808
commit 2217595c6b
2 changed files with 14 additions and 7 deletions

View file

@ -123,7 +123,6 @@ public:
/// @param message the message
/// @param timeout the send timeout
/// @param handler async result handler with the response message or error
//template <>
void sendRequest(const msg::message_ptr& message, const chronos::usec& timeout, const MessageHandler<msg::BaseMessage>& handler);
/// @sa sendRequest with templated response message
@ -161,6 +160,9 @@ protected:
boost::asio::io_context::strand strand_;
struct PendingMessage
{
PendingMessage(const msg::message_ptr& msg, ResultHandler handler) : msg(msg), handler(handler)
{
}
msg::message_ptr msg;
ResultHandler handler;
};