summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/interfaces/libpq/fe-connect.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index faf2c569dac..e1650ca4f0e 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -1410,6 +1410,9 @@ keep_going: /* We will come back to here until there is
closesocket(conn->sock);
conn->sock = -1;
conn->status = CONNECTION_NEEDED;
+ /* Discard any unread/unsent data */
+ conn->inStart = conn->inCursor = conn->inEnd = 0;
+ conn->outCount = 0;
goto keep_going;
}
else
@@ -1447,6 +1450,9 @@ keep_going: /* We will come back to here until there is
closesocket(conn->sock);
conn->sock = -1;
conn->status = CONNECTION_NEEDED;
+ /* Discard any unread/unsent data */
+ conn->inStart = conn->inCursor = conn->inEnd = 0;
+ conn->outCount = 0;
goto keep_going;
}
}
@@ -1560,6 +1566,9 @@ keep_going: /* We will come back to here until there is
closesocket(conn->sock);
conn->sock = -1;
conn->status = CONNECTION_NEEDED;
+ /* Discard any unread/unsent data */
+ conn->inStart = conn->inCursor = conn->inEnd = 0;
+ conn->outCount = 0;
goto keep_going;
}
@@ -1626,6 +1635,9 @@ keep_going: /* We will come back to here until there is
closesocket(conn->sock);
conn->sock = -1;
conn->status = CONNECTION_NEEDED;
+ /* Discard any unread/unsent data */
+ conn->inStart = conn->inCursor = conn->inEnd = 0;
+ conn->outCount = 0;
goto keep_going;
}
@@ -1645,6 +1657,9 @@ keep_going: /* We will come back to here until there is
closesocket(conn->sock);
conn->sock = -1;
conn->status = CONNECTION_NEEDED;
+ /* Discard any unread/unsent data */
+ conn->inStart = conn->inCursor = conn->inEnd = 0;
+ conn->outCount = 0;
goto keep_going;
}
#endif