aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/net/levin_protocol_handler.h
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-11-14 14:54:05 +0200
committerRiccardo Spagni <ric@spagni.net>2017-11-14 14:54:05 +0200
commit9317c9c57e72de315f0b53ebc73fce215ed1021f (patch)
treec66af7854ae62f7d1d320963c25ec37f12be6ee5 /contrib/epee/include/net/levin_protocol_handler.h
parentMerge pull request #2615 (diff)
parentFix an object lifetime bug in net load tests (diff)
downloadmonero-9317c9c57e72de315f0b53ebc73fce215ed1021f.tar.xz
Merge pull request #2617
7dbf76d0 Fix an object lifetime bug in net load tests (moneromooo-monero)
Diffstat (limited to 'contrib/epee/include/net/levin_protocol_handler.h')
-rw-r--r--contrib/epee/include/net/levin_protocol_handler.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/epee/include/net/levin_protocol_handler.h b/contrib/epee/include/net/levin_protocol_handler.h
index fbc9727e2..b3a75bedc 100644
--- a/contrib/epee/include/net/levin_protocol_handler.h
+++ b/contrib/epee/include/net/levin_protocol_handler.h
@@ -43,6 +43,8 @@ namespace levin
struct protocl_handler_config
{
levin_commands_handler<t_connection_context>* m_pcommands_handler;
+ void (*m_pcommands_handler_destroy)(levin_commands_handler<t_connection_context>*);
+ ~protocl_handler_config() { if (m_pcommands_handler && m_pcommands_handler_destroy) (*m_pcommands_handler_destroy)(m_pcommands_handler); }
};
template<class t_connection_context = net_utils::connection_context_base>