Fix bugs in RedisBungee functionality. Closes #41

This commit is contained in:
Tux 2016-10-13 23:44:49 -04:00
parent 2280034dde
commit ac11730d46
2 changed files with 10 additions and 3 deletions

View File

@ -276,9 +276,14 @@ public final class RedisBungee extends Plugin {
} catch (JedisConnectionException e) {
// Redis server has disappeared!
getLogger().log(Level.SEVERE, "Unable to update heartbeat - did your Redis server go away?", e);
return;
}
try {
serverIds = getCurrentServerIds(true, false);
globalPlayerCount.set(getCurrentCount());
} catch (Throwable e) {
getLogger().log(Level.SEVERE, "Unable to update data - did your Redis server go away?", e);
}
serverIds = getCurrentServerIds(true, false);
globalPlayerCount.set(getCurrentCount());
}
}, 0, 3, TimeUnit.SECONDS);
dataManager = new DataManager(this);
@ -357,6 +362,8 @@ public final class RedisBungee extends Plugin {
}
pipeline.sync();
} catch (Throwable e) {
getLogger().log(Level.SEVERE, "Unable to fix up stored player data", e);
}
}
}, 0, 1, TimeUnit.MINUTES);

View File

@ -34,7 +34,7 @@ public abstract class RedisCallable<T> implements Callable<T>, Runnable {
} catch (InterruptedException e1) {
throw new RuntimeException("task failed to run", e1);
}
run(true);
return run(true);
}
}