mirror of
https://github.com/wownero/wownero.git
synced 2026-11-16 05:13:55 +01:00
Fix an object lifetime bug in net load tests
The commands handler must not be destroyed before the config object, or we'll be accessing freed memory. An earlier attempt at using boost::shared_ptr to control object lifetime turned out to be very invasive, though would be a better solution in theory.
This commit is contained in:
@@ -560,7 +560,7 @@ namespace nodetool
|
||||
|
||||
//configure self
|
||||
m_net_server.set_threads_prefix("P2P");
|
||||
m_net_server.get_config_object().m_pcommands_handler = this;
|
||||
m_net_server.get_config_object().set_handler(this);
|
||||
m_net_server.get_config_object().m_invoke_timeout = P2P_DEFAULT_INVOKE_TIMEOUT;
|
||||
m_net_server.set_connection_filter(this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user