Skip to content

Commit b866b05

Browse files
committed
workaround for shutdownNow leak in java21
1 parent 127340b commit b866b05

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

common/src/main/java/com/tc/net/protocol/tcm/MessageMonitorImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ private ScheduledFuture<?> startLogging(final Logger logger, int intervalSeconds
9393
public void shutdown() {
9494
currentTask.cancel(true);
9595
timer.shutdownNow();
96+
timer.shutdown();
9697
}
9798

9899
@Override

tc-client/src/main/java/com/tc/object/ClientEntityManagerImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ public void shutdown() {
402402
}
403403
}
404404
this.endpointCloser.shutdownNow(); // ignore the return. nothing we can do
405+
this.endpointCloser.shutdown();
405406
// And then drop them.
406407
if (logger.isDebugEnabled()) {
407408
MapListPrettyPrint print = new MapListPrettyPrint();

tc-server/src/main/java/com/tc/objectserver/entity/ActiveToPassiveReplication.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ public void nodeLeft(NodeID nodeID) {
386386

387387
public void close() {
388388
passiveSyncPool.shutdownNow();
389+
passiveSyncPool.shutdown(); // bug in java21 under certain class loading scenarios
389390
while (!waiters.isEmpty()) {
390391
LOGGER.info("waiters not empty on shutdown. Removing:" + passiveNodes);
391392
Iterator<Map.Entry<SyncReplicationActivity.ActivityID, ActivePassiveAckWaiter>> items = waiters.entrySet().iterator();

0 commit comments

Comments
 (0)