summaryrefslogtreecommitdiff
path: root/node
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-09-18 10:01:30 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-09-18 10:01:30 -0700
commit470823104613fdb8abd8a2ebae6a5c8d7a5679d2 (patch)
treeccedc83e1e855a8af348514fae4655b875c24823 /node
parent924f03099412f989ee99a117239f8e326a1c3d00 (diff)
downloadinfinitytier-470823104613fdb8abd8a2ebae6a5c8d7a5679d2.tar.gz
infinitytier-470823104613fdb8abd8a2ebae6a5c8d7a5679d2.zip
Fix for GitHub issue #122 and other fixes
Diffstat (limited to 'node')
-rw-r--r--node/Constants.hpp5
-rw-r--r--node/Node.cpp4
2 files changed, 7 insertions, 2 deletions
diff --git a/node/Constants.hpp b/node/Constants.hpp
index 21360e51..9aa16ddf 100644
--- a/node/Constants.hpp
+++ b/node/Constants.hpp
@@ -415,4 +415,9 @@
*/
#define ZT_MAX_BRIDGE_SPAM 16
+/**
+ * Timeout for IPC connections (e.g. unix domain sockets) in seconds
+ */
+#define ZT_IPC_TIMEOUT 600
+
#endif
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