mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-23 09:23:43 +03:00
/me does not like empty for loops
This commit is contained in:
parent
53748443d8
commit
3f2c1f6489
|
@ -294,11 +294,9 @@ pq_clear_async(connectionObject *conn)
|
||||||
many parts, i.e. "select 1; select 2", there will be many) and also
|
many parts, i.e. "select 1; select 2", there will be many) and also
|
||||||
finalize asynchronous processing so the connection will be ready to
|
finalize asynchronous processing so the connection will be ready to
|
||||||
accept another query */
|
accept another query */
|
||||||
for (;;) {
|
|
||||||
pgres = PQgetResult(conn->pgconn);
|
while ((pgres = PQgetResult(conn->pgconn)) != NULL) {
|
||||||
Dprintf("pq_clear_async: clearing PGresult at %p", pgres);
|
Dprintf("pq_clear_async: clearing PGresult at %p", pgres);
|
||||||
if (pgres == NULL)
|
|
||||||
break;
|
|
||||||
CLEARPGRES(pgres);
|
CLEARPGRES(pgres);
|
||||||
}
|
}
|
||||||
conn->async_cursor = NULL;
|
conn->async_cursor = NULL;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user