]> granicus.if.org Git - pgbouncer/commitdiff
Revert "Skip cleanup if there is takeover"
authorMarko Kreen <markokr@gmail.com>
Thu, 25 Feb 2016 18:52:39 +0000 (20:52 +0200)
committerMarko Kreen <markokr@gmail.com>
Thu, 25 Feb 2016 18:52:39 +0000 (20:52 +0200)
This reverts commit 7c03a6c8f8d9ffcc3f0152e74c629213487b6d64.

include/admin.h
src/admin.c
src/main.c

index 08cb99af6c5b4dbc2f5df2f677a825a1691d8196..87d7ee9c3ed6cf885253c3dde62f49d9f6a78cb0 100644 (file)
@@ -15,9 +15,6 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
-
-extern bool got_show_fds;
-
 bool admin_handle_client(PgSocket *client, PktHdr *pkt)  _MUSTCHECK;
 bool admin_pre_login(PgSocket *client, const char *username)  _MUSTCHECK;
 bool admin_post_login(PgSocket *client)  _MUSTCHECK;
index 74fed1a2e0b04082ece834359182e7dcdd61b3f5..735a21a595afbc337fbad56753f7914be8f9ba34 100644 (file)
@@ -69,8 +69,6 @@ static PgPool *admin_pool;
 /* only valid during processing */
 static const char *current_query;
 
-bool got_show_fds;
-
 void admin_cleanup(void)
 {
        regfree(&rc_cmd);
@@ -371,8 +369,6 @@ static bool show_fds_from_list(PgSocket *admin, struct StatList *list)
        PgSocket *sk;
        bool res = true;
 
-       got_show_fds = true;
-
        statlist_for_each(item, list) {
                sk = container_of(item, PgSocket, head);
                res = show_one_fd(admin, sk);
index 16eca88361aea20f4e5b3ad7659d3f722efa4417..44e4d4b2cbb10059b9700e4bd1cebf1cae7c0b7f 100644 (file)
@@ -922,9 +922,7 @@ int main(int argc, char *argv[])
        while (cf_shutdown < 2)
                main_loop_once();
 
-       /* proper cleanup, unless there is takeover */
-       if (!got_show_fds)
-               cleanup();
+       cleanup();
 
        return 0;
 }