mirror of
https://github.com/boostorg/beast.git
synced 2025-08-02 22:34:32 +02:00
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:
committed by
Vinnie Falco
parent
49cdabca19
commit
69f3e4d8fb
@@ -427,6 +427,7 @@ public:
|
|||||||
testIssue954()
|
testIssue954()
|
||||||
{
|
{
|
||||||
echo_server es{log};
|
echo_server es{log};
|
||||||
|
multi_buffer b;
|
||||||
boost::asio::io_context ioc;
|
boost::asio::io_context ioc;
|
||||||
stream<test::stream> ws{ioc};
|
stream<test::stream> ws{ioc};
|
||||||
ws.next_layer().connect(es.stream());
|
ws.next_layer().connect(es.stream());
|
||||||
@@ -443,7 +444,6 @@ public:
|
|||||||
{
|
{
|
||||||
called_cb = true;
|
called_cb = true;
|
||||||
});
|
});
|
||||||
multi_buffer b;
|
|
||||||
ws.async_read(b,
|
ws.async_read(b,
|
||||||
[&](error_code, std::size_t)
|
[&](error_code, std::size_t)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user