diff options
Diffstat (limited to 'src/interfaces/libpq/fe-connect.c')
| -rw-r--r-- | src/interfaces/libpq/fe-connect.c | 18 | 
1 files changed, 18 insertions, 0 deletions
| diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index 0efc1700c93..d1e11a66a5f 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -1911,6 +1911,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 @@ -1948,6 +1951,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;  					}  				} @@ -2061,6 +2067,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;  					} @@ -2128,6 +2137,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;  					} @@ -2147,6 +2159,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 @@ -2308,6 +2323,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;  						}  					} | 
