From 6c3dd5cebdb53ab9f21d805e9a6bc1de9a1ece36 Mon Sep 17 00:00:00 2001 From: Sebastian Hahta <joseha@utu.fi> Date: Fri, 31 Jan 2020 10:30:12 +0200 Subject: [PATCH] fix crash --- components/net/cpp/src/universe.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/net/cpp/src/universe.cpp b/components/net/cpp/src/universe.cpp index c1817efcf..d3b4d1f32 100644 --- a/components/net/cpp/src/universe.cpp +++ b/components/net/cpp/src/universe.cpp @@ -46,6 +46,7 @@ callback_t ftl::net::Universe::cbid__ = 0; Universe::Universe() : Configurable(), active_(true), + impl_(new ftl::net::NetImplDetail), this_peer(ftl::net::this_peer), phase_(0), send_size_(TCP_SEND_BUFFER_SIZE), @@ -53,8 +54,6 @@ Universe::Universe() : periodic_time_(1.0), reconnect_attempts_(50), thread_(Universe::__start, this) { - - impl_ = new ftl::net::NetImplDetail; _installBindings(); LOG(WARNING) << "Deprecated Universe constructor"; @@ -63,6 +62,7 @@ Universe::Universe() : Universe::Universe(nlohmann::json &config) : Configurable(config), active_(true), + impl_(new ftl::net::NetImplDetail), this_peer(ftl::net::this_peer), phase_(0), send_size_(value("tcp_send_buffer",TCP_SEND_BUFFER_SIZE)), @@ -71,7 +71,6 @@ Universe::Universe(nlohmann::json &config) : reconnect_attempts_(value("reconnect_attempts",50)), thread_(Universe::__start, this) { - impl_ = new ftl::net::NetImplDetail; _installBindings(); // Add an idle timer job to garbage collect peer objects -- GitLab