From 6e3144370ab19f8110b0e1bcd43d66bab076e0f2 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Thu, 6 Dec 2018 13:10:59 -0800 Subject: exit controller if onlinenotification thread exits while _run == 1 --- controller/PostgreSQL.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'controller') 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) { -- cgit v1.2.3