Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 61f5e13

Browse files
committed
! * Users doing non-blocking connections need to handle the reset
! * themselves, they'll need to check the connection status if we ! * return an error. Alfred Perlstein
1 parent 936b27f commit 61f5e13

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/interfaces/libpq/fe-exec.c

+10-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.94 2000/04/12 17:17:14 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.95 2000/05/25 19:09:55 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1587,7 +1587,15 @@ PQendcopy(PGconn *conn)
15871587

15881588
DONOTICE(conn, "PQendcopy: resetting connection\n");
15891589

1590-
PQreset(conn);
1590+
/*
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);
15911599

15921600
return 1;
15931601
}

0 commit comments

Comments
 (0)