Fixes #2530 - Client waits forever for cancelled uploads.

Added comment after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2018-07-09 17:26:05 +02:00
parent 0c8b33e581
commit 6553957278
1 changed files with 3 additions and 0 deletions

View File

@ -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));
}