Skip to content

Commit

Permalink
Remove redundant removing of Aeron dir
Browse files Browse the repository at this point in the history
  • Loading branch information
segabriel committed Dec 28, 2019
1 parent 29a05db commit 498756c
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions reactor-aeron/src/main/java/reactor/aeron/mdc/AeronResources.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
import io.aeron.Publication;
import io.aeron.Subscription;
import io.aeron.driver.MediaDriver;
import java.io.File;
import java.nio.file.Paths;
import java.time.Duration;
import java.util.Optional;
import java.util.UUID;
Expand Down Expand Up @@ -312,10 +310,6 @@ private Mono<Void> doStart() {
eventLoopGroup =
new AeronEventLoopGroup("reactor-aeron", numOfWorkers, workerIdleStrategySupplier);

Runtime.getRuntime()
.addShutdownHook(
new Thread(() -> deleteAeronDirectory(mediaDriver.aeronDirectoryName())));

logger.debug(
"{} has initialized embedded media driver, aeron directory: {}",
this,
Expand Down Expand Up @@ -536,14 +530,6 @@ private Mono<Void> doDispose() {
});
}

private void deleteAeronDirectory(String aeronDirectoryName) {
File aeronDirectory = Paths.get(aeronDirectoryName).toFile();
if (aeronDirectory.exists()) {
IoUtil.delete(aeronDirectory, true);
logger.debug("{} deleted aeron directory {}", this, aeronDirectoryName);
}
}

@Override
public String toString() {
return "AeronResources" + Integer.toHexString(System.identityHashCode(this));
Expand Down

0 comments on commit 498756c

Please sign in to comment.