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