Skip to content

Commit ccbe9a6

Browse files
authored
RATIS-2194. FileLock didn't unlock properly (#1183)
1 parent 04396ca commit ccbe9a6

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerProxy.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,13 @@ private void startImpl() throws IOException {
416416
public void close() {
417417
lifeCycle.checkStateAndClose(() -> {
418418
LOG.info("{}: close", getId());
419+
420+
try {
421+
ConcurrentUtils.shutdownAndWait(implExecutor.get());
422+
} catch (Exception ignored) {
423+
LOG.warn(getId() + ": Failed to shutdown implExecutor", ignored);
424+
}
425+
419426
impls.close();
420427

421428
try {
@@ -430,12 +437,6 @@ public void close() {
430437
LOG.warn(getId() + ": Failed to close " + SupportedDataStreamType.NETTY + " server", ignored);
431438
}
432439

433-
try {
434-
ConcurrentUtils.shutdownAndWait(implExecutor.get());
435-
} catch (Exception ignored) {
436-
LOG.warn(getId() + ": Failed to shutdown implExecutor", ignored);
437-
}
438-
439440
try {
440441
ConcurrentUtils.shutdownAndWait(executor.get());
441442
} catch (Exception ignored) {

0 commit comments

Comments
 (0)