From d1de30e18dc39d0def503ad8a56cf2f0e67fb0dc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 12 Aug 2024 14:57:17 +0200 Subject: [PATCH] pg/AsyncConnection: rename IsBusy() to IsRequestPending() Fixes a regression by commit e6ec15fc6408d74 which added an IsBusy() method which shadowed Connection::IsBusy(). --- src/pg/AsyncConnection.hxx | 2 +- src/pg/SharedConnection.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pg/AsyncConnection.hxx b/src/pg/AsyncConnection.hxx index db55d071a..a76c4753e 100644 --- a/src/pg/AsyncConnection.hxx +++ b/src/pg/AsyncConnection.hxx @@ -223,7 +223,7 @@ public: * * Note that this is not the strict opposite of IsIdle(). */ - bool IsBusy() const noexcept { + bool IsRequestPending() const noexcept { return result_handler != nullptr; } diff --git a/src/pg/SharedConnection.cxx b/src/pg/SharedConnection.cxx index 0bf1a9851..5048b84c2 100644 --- a/src/pg/SharedConnection.cxx +++ b/src/pg/SharedConnection.cxx @@ -39,7 +39,7 @@ SharedConnection::CancelQuery(SharedConnectionQuery &query) noexcept usually not idle, but maybe it's waiting for something else inbetween two queries, so we need to check anyway */ - if (connection.IsBusy()) + if (connection.IsRequestPending()) connection.RequestCancel(); /* submit the next query (outside of this caller