Skip to content
Permalink
Browse files

[CONJ-673] Abording a connection while fetching a query won't read th…

…e whole result-set

(cherry picked from commit d7f3bda)
  • Loading branch information...
rusher committed Jan 10, 2019
1 parent d4a7bd8 commit 6c36108d41a07bcf956e2ff2cf98b5ef70cc4bce
@@ -199,11 +199,12 @@ private static void closeSocket(PacketInputStream packetInputStream,
PacketOutputStream packetOutputStream, Socket socket) {
try {
try {
long maxCurrentMillis = System.currentTimeMillis() + 10;
socket.shutdownOutput();
socket.setSoTimeout(3);
InputStream is = socket.getInputStream();
//noinspection StatementWithEmptyBody
while (is.read() != -1) {
while (is.read() != -1 && System.currentTimeMillis() < maxCurrentMillis) {
//read byte
}
} catch (Throwable t) {

0 comments on commit 6c36108

Please sign in to comment.
You can’t perform that action at this time.