From 9aeb28066d6e885887ac63dee5008f5290db83da Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Thu, 7 Aug 2014 19:19:21 +0200 Subject: [PATCH] fix inverted logic --- routed.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/routed.cpp b/routed.cpp index adf2e2dbc..f0891ce3e 100644 --- a/routed.cpp +++ b/routed.cpp @@ -169,14 +169,14 @@ int main(int argc, const char *argv[]) auto status = future.wait_for(std::chrono::seconds(2)); - if (status != std::future_status::ready) + if (status == std::future_status::ready) { - SimpleLogger().Write(logWARNING) << "Didn't exit within 2 seconds. Hard abort!"; - server_task.reset(); // just kill it + server_thread.join(); } else { - server_thread.join(); + SimpleLogger().Write(logWARNING) << "Didn't exit within 2 seconds. Hard abort!"; + server_task.reset(); // just kill it } }