mirror of https://github.com/citusdata/citus.git
don't send unnecessary cancels
parent
5fcddfa2c6
commit
8aca59fa32
|
@ -1042,6 +1042,12 @@ SendCancelationRequest(MultiConnection *connection)
|
||||||
{
|
{
|
||||||
char errorBuffer[ERROR_BUFFER_SIZE] = { 0 };
|
char errorBuffer[ERROR_BUFFER_SIZE] = { 0 };
|
||||||
|
|
||||||
|
if (!PQisBusy(connection->pgConn))
|
||||||
|
{
|
||||||
|
/* no statement in progress, nothing to cancel */
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
PGcancel *cancelObject = PQgetCancel(connection->pgConn);
|
PGcancel *cancelObject = PQgetCancel(connection->pgConn);
|
||||||
if (cancelObject == NULL)
|
if (cancelObject == NULL)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue