From 470823104613fdb8abd8a2ebae6a5c8d7a5679d2 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 18 Sep 2014 10:01:30 -0700 Subject: Fix for GitHub issue #122 and other fixes --- node/Node.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'node/Node.cpp') diff --git a/node/Node.cpp b/node/Node.cpp index f3def0f0..03749474 100644 --- a/node/Node.cpp +++ b/node/Node.cpp @@ -493,9 +493,9 @@ Node::ReasonForTermination Node::run() lastShutdownIfUnreadableCheck = now; if (Utils::fileExists(shutdownIfUnreadablePath.c_str(),false)) { int tmpfd = ::open(shutdownIfUnreadablePath.c_str(),O_RDONLY,0); - if (tmpfd < 0) + if (tmpfd < 0) { return impl->terminateBecause(Node::NODE_NORMAL_TERMINATION,"shutdownIfUnreadable exists but is not readable"); - else ::close(tmpfd); + } else ::close(tmpfd); } } #endif -- cgit v1.2.3