mirror of
https://github.com/wownero/wownero.git
synced 2026-10-17 07:31:35 +02:00
p2p: stop buffered dispatch after fatal notifications
(cherry picked from commit f397f3920998aa8f57f86c9539fd720d288c7e18)
This commit is contained in:
@@ -562,7 +562,13 @@ public:
|
||||
return false;
|
||||
}
|
||||
else
|
||||
m_config.m_pcommands_handler->notify(m_current_head.m_command, buff_to_invoke, m_connection_context);
|
||||
{
|
||||
const int notify_result = m_config.m_pcommands_handler->notify(
|
||||
m_current_head.m_command, buff_to_invoke, m_connection_context
|
||||
);
|
||||
if(notify_result < 0)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// reuse small buffer
|
||||
if (!temp.empty() && temp.capacity() <= 64 * 1024)
|
||||
|
||||
@@ -285,7 +285,7 @@ namespace epee
|
||||
#define END_INVOKE_MAP2() \
|
||||
LOG_ERROR("Unknown command:" << command); \
|
||||
on_levin_traffic(context, false, false, true, in_buff.size(), "invalid-command"); \
|
||||
return LEVIN_ERROR_CONNECTION_HANDLER_NOT_DEFINED; \
|
||||
return is_notify ? LEVIN_OK : LEVIN_ERROR_CONNECTION_HANDLER_NOT_DEFINED; \
|
||||
} \
|
||||
catch (const std::exception &e) { \
|
||||
MERROR("Error in handle_invoke_map: " << e.what()); \
|
||||
|
||||
Reference in New Issue
Block a user