summaryrefslogtreecommitdiff
path: root/controller/PostgreSQL.cpp
diff options
context:
space:
mode:
authorGrant Limberg <grant.limberg@zerotier.com>2018-12-06 13:10:59 -0800
committerGrant Limberg <grant.limberg@zerotier.com>2018-12-06 13:10:59 -0800
commit6e3144370ab19f8110b0e1bcd43d66bab076e0f2 (patch)
tree66a6e046f64c39ebed5496db963dda8114007c00 /controller/PostgreSQL.cpp
parent20f02bb772cde179b6d58f33199aaaead3abba87 (diff)
downloadinfinitytier-6e3144370ab19f8110b0e1bcd43d66bab076e0f2.tar.gz
infinitytier-6e3144370ab19f8110b0e1bcd43d66bab076e0f2.zip
exit controller if onlinenotification thread exits while _run == 1
Diffstat (limited to 'controller/PostgreSQL.cpp')
-rw-r--r--controller/PostgreSQL.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/controller/PostgreSQL.cpp b/controller/PostgreSQL.cpp
index e0100613..a745d79c 100644
--- a/controller/PostgreSQL.cpp
+++ b/controller/PostgreSQL.cpp
@@ -1326,6 +1326,9 @@ void PostgreSQL::onlineNotificationThread()
}
fprintf(stderr, "%s: Fell out of run loop in onlineNotificationThread", _myAddressStr.c_str());
PQfinish(conn);
+ if (_run != 0) {
+ exit(6);
+ }
}
PGconn *PostgreSQL::getPgConn(OverrideMode m) {