From 655395727828a1a8c8fdbf253ebb5a2ff3c11435 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Mon, 9 Jul 2018 17:26:05 +0200 Subject: [PATCH] Fixes #2530 - Client waits forever for cancelled uploads. Added comment after review. Signed-off-by: Simone Bordet --- .../src/main/java/org/eclipse/jetty/io/ManagedSelector.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java b/jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java index 5620ab71529..f0ff037917c 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java @@ -237,6 +237,9 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable public void destroyEndPoint(final EndPoint endPoint) { + // Waking up the selector is necessary to clean the + // cancelled-key set and tell the TCP stack that the + // socket is closed (so that senders receive RST). submit(WAKEUP); execute(new DestroyEndPoint(endPoint)); }