From f5786d0bbb1c8570607d70f8418bf62c6612e143 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Tue, 15 Nov 2016 16:56:21 +0100 Subject: [PATCH] [Node] Load nodes after network start --- src/Components/Modules/News.cpp | 2 -- src/Components/Modules/Node.cpp | 8 ++++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Components/Modules/News.cpp b/src/Components/Modules/News.cpp index 7a1079c7..d8a81c27 100644 --- a/src/Components/Modules/News.cpp +++ b/src/Components/Modules/News.cpp @@ -173,8 +173,6 @@ namespace Components if (!Loader::PerformingUnitTests()) { - Node::LoadNodeRemotePreset(); - while (!News::Terminate) { News::CheckForUpdate(); diff --git a/src/Components/Modules/Node.cpp b/src/Components/Modules/Node.cpp index 49518ae5..22377832 100644 --- a/src/Components/Modules/Node.cpp +++ b/src/Components/Modules/Node.cpp @@ -878,6 +878,14 @@ namespace Components // Install frame handlers QuickPatch::OnFrame(Node::FrameHandler); + + Network::OnStart([] () + { + std::thread([] () + { + Node::LoadNodeRemotePreset(); + }).detach(); + }); } Node::~Node()