Don't use-after-free in test:

fix #1327

Move construction of a queued completion handler was
accessing destroyed data.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
This commit is contained in:
Damian Jarek
2018-11-27 20:07:56 +01:00
committed by Vinnie Falco
parent 49cdabca19
commit 69f3e4d8fb

View File

@@ -427,6 +427,7 @@ public:
testIssue954()
{
echo_server es{log};
multi_buffer b;
boost::asio::io_context ioc;
stream<test::stream> ws{ioc};
ws.next_layer().connect(es.stream());
@@ -443,7 +444,6 @@ public:
{
called_cb = true;
});
multi_buffer b;
ws.async_read(b,
[&](error_code, std::size_t)
{