Skip to content
Permalink
Browse files
Revert "fix: remove receiving EOF from backend after cancel since acc…
…ording to protocol the server closes the connection once cancel is sent (connection reset exception is always thrown) (#1641)"

This reverts commit 23cce8a.
  • Loading branch information
vlsi committed Mar 6, 2020
1 parent 7da6007 commit ca1f60ffb414891101b72a226ed4f36f97bf82e2
Showing 2 changed files with 2 additions and 1 deletion.
@@ -185,6 +185,7 @@ public void sendQueryCancel() throws SQLException {
cancelStream.sendInteger4(cancelPid);
cancelStream.sendInteger4(cancelKey);
cancelStream.flush();
cancelStream.receiveEOF();
} catch (IOException e) {
// Safe to ignore.
LOGGER.log(Level.FINEST, "Ignoring exception on cancel request:", e);
@@ -903,7 +903,7 @@ public Void call() throws Exception {
}
}

@Test(timeout = 2000)
@Test(timeout = 20000)
public void testFastCloses() throws SQLException {
ExecutorService executor = Executors.newSingleThreadExecutor();
con.createStatement().execute("SET SESSION client_min_messages = 'NOTICE'");

0 comments on commit ca1f60f

Please sign in to comment.