From 690403a626b2b5dc3fba32b55a02fff81aef8bad Mon Sep 17 00:00:00 2001 From: cryptocode Date: Fri, 8 Feb 2019 09:48:02 +0100 Subject: [PATCH] ipc: Handle rpc actions doing async ops (#1708) --- nano/node/ipc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nano/node/ipc.cpp b/nano/node/ipc.cpp index bce1bce4..e24ec364 100644 --- a/nano/node/ipc.cpp +++ b/nano/node/ipc.cpp @@ -237,8 +237,8 @@ public: auto body (std::string (reinterpret_cast (buffer.data ()), buffer.size ())); // Note that if the rpc action is async, the shared_ptr lifetime will be extended by the action handler - nano::rpc_handler handler (node, server.rpc, body, request_id_l, response_handler_l); - handler.process_request (); + auto handler (std::make_shared (node, server.rpc, body, request_id_l, response_handler_l)); + handler->process_request (); } /** Async request reader */