Skip to content

Commit ff055b1

Browse files
committed
Fixed shutdown hook
1 parent 0917e95 commit ff055b1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/main/java/redis/embedded/RedisInstance.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ public synchronized void start() throws IOException {
3535
process = new ProcessBuilder(args)
3636
.directory(new File(args.get(0)).getParentFile())
3737
.start();
38-
addShutdownHook("RedisInstanceCleaner", checkedToRuntime(new CheckedRunnable() {
39-
public void run() throws Exception {
40-
}
41-
}));
38+
addShutdownHook("RedisInstanceCleaner", checkedToRuntime(this::stop));
4239
logStream(process.getErrorStream(), System.out::println);
4340
awaitServerReady();
4441

0 commit comments

Comments
 (0)