2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2024-11-23 04:28:01 +00:00

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

View File

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