We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 936b27f commit 61f5e13Copy full SHA for 61f5e13
src/interfaces/libpq/fe-exec.c
@@ -8,7 +8,7 @@
8
*
9
10
* IDENTIFICATION
11
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.94 2000/04/12 17:17:14 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.95 2000/05/25 19:09:55 momjian Exp $
12
13
*-------------------------------------------------------------------------
14
*/
@@ -1587,7 +1587,15 @@ PQendcopy(PGconn *conn)
1587
1588
DONOTICE(conn, "PQendcopy: resetting connection\n");
1589
1590
- PQreset(conn);
+ /*
1591
+ * Users doing non-blocking connections need to handle the reset
1592
+ * themselves, they'll need to check the connection status if we
1593
+ * return an error.
1594
+ */
1595
+ if (pqIsnonblocking(conn))
1596
+ PQresetStart(conn);
1597
+ else
1598
+ PQreset(conn);
1599
1600
return 1;
1601
}
0 commit comments