File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
modules/platforms/cpp/ignite/client/detail Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -86,10 +86,12 @@ void node_connection::process_message(bytes_view msg) {
8686 auto pos = reader.position ();
8787 bytes_view data{msg.data () + pos, msg.size () - pos};
8888
89- { // Locking scope
89+ std::shared_ptr<response_handler> handler{};
90+ {
9091 std::lock_guard<std::recursive_mutex> lock (m_request_handlers_mutex);
9192
92- auto handler = find_handler_unsafe (req_id);
93+ handler = find_handler_unsafe (req_id);
94+ }
9395 if (!handler) {
9496 m_logger->log_error (" Missing handler for request with id=" + std::to_string (req_id));
9597 return ;
@@ -106,6 +108,8 @@ void node_connection::process_message(bytes_view msg) {
106108 m_logger->log_error (" Uncaught user callback exception: " + result.error ().what_str ());
107109 }
108110
111+ {
112+ std::lock_guard<std::recursive_mutex> lock (m_request_handlers_mutex);
109113 if (handler->is_handling_complete ()) {
110114 m_request_handlers.erase (req_id);
111115 }
You can’t perform that action at this time.
0 commit comments