소스 검색

exit controller if onlinenotification thread exits while _run == 1

Grant Limberg 6 년 전
부모
커밋
6e3144370a
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      controller/PostgreSQL.cpp

+ 3 - 0
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) {