ipc: Handle rpc actions doing async ops (#1708)

This commit is contained in:
cryptocode 2019-02-08 09:48:02 +01:00 committed by GitHub
commit 690403a626
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -237,8 +237,8 @@ public:
auto body (std::string (reinterpret_cast<char *> (buffer.data ()), buffer.size ()));
// Note that if the rpc action is async, the shared_ptr<rpc_handler> 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<nano::rpc_handler> (node, server.rpc, body, request_id_l, response_handler_l));
handler->process_request ();
}
/** Async request reader */