Skip to content

Commit

Permalink
Revert "fix: remove receiving EOF from backend after cancel since acc…
Browse files Browse the repository at this point in the history
…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 ca1f60f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'");
Expand Down

0 comments on commit ca1f60f

Please sign in to comment.