Enhancement on stopping redis instance

Redis server started with nosave and randomdir options is stopped with
destroy instead of sending shutdown.
pull/509/head
Rui Gu 9 years ago
parent 7671e59dea
commit 724375b3a4

@ -709,7 +709,7 @@ public class RedisRunner {
} }
public int stop() throws InterruptedException { public int stop() throws InterruptedException {
if (runner.isNosave()) { if (runner.isNosave() && !runner.isRandomDir()) {
ArrayList<String> b = runner.getBindAddr(); ArrayList<String> b = runner.getBindAddr();
RedisClient c = new RedisClient(b.size() > 0 ? b.get(0) : "localhost", runner.getPort()); RedisClient c = new RedisClient(b.size() > 0 ? b.get(0) : "localhost", runner.getPort());
c.connect() c.connect()

Loading…
Cancel
Save