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:
moneromooo-monero
2017-10-09 16:46:42 +01:00
parent 86e9de588c
commit 7dbf76d0da
10 changed files with 45 additions and 16 deletions
+1
View File
@@ -87,6 +87,7 @@ namespace levin
virtual void on_connection_new(t_connection_context& context){};
virtual void on_connection_close(t_connection_context& context){};
virtual ~levin_commands_handler(){}
};
#define LEVIN_OK 0