From 6d42a6b4e0a9d2ffe5d0da2ff4261b50b4986b66 Mon Sep 17 00:00:00 2001 From: Bela Ban Date: Wed, 2 Oct 2024 14:58:00 +0200 Subject: [PATCH] Catching InterruptedException now interrupts the caller thread again (https://issues.redhat.com/browse/JGRP-2835) --- src/org/jgroups/protocols/TransferQueueBundler.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/org/jgroups/protocols/TransferQueueBundler.java b/src/org/jgroups/protocols/TransferQueueBundler.java index 604acacbc0..712e4e957f 100644 --- a/src/org/jgroups/protocols/TransferQueueBundler.java +++ b/src/org/jgroups/protocols/TransferQueueBundler.java @@ -81,7 +81,12 @@ public synchronized void stop() { if(tmp != null) { tmp.interrupt(); if(tmp.isAlive()) { - try {tmp.join(500);} catch(InterruptedException e) {} + try { + tmp.join(500); + } + catch(InterruptedException e) { + Thread.currentThread().interrupt(); + } } } drain(); @@ -129,6 +134,9 @@ public void run() { sendBundledMessages(); } } + catch(InterruptedException iex) { + Thread.currentThread().interrupt(); + } catch(Throwable t) { log.trace("%s: failed sending message: %s", transport.addr(), t); }