minecrafter / RedisBungee

The leading player synchronization system for BungeeCord
https://www.spigotmc.org/resources/redisbungee.13494/
Eclipse Public License 1.0
157 stars 122 forks source link

Surviving *short* Redis Timeouts #41

Closed Moehritz closed 8 years ago

Moehritz commented 8 years ago

Hello, it happens to us sometimes that a connection to the redis server breaks - and there are some problems we have encountered so far:

First, look at this file: https://github.com/minecrafter/RedisBungee/blob/master/src/main/java/com/imaginarycode/minecraft/redisbungee/util/RedisCallable.java#L37

Shouldn't there be a return run(true); ? Because right now, a retry will throw a RuntimeException if successfull, and if not successfull a JedisConnectionException which is not handled.

Second problem is this: https://github.com/minecrafter/RedisBungee/blob/master/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java#L280

When failing one of these two tasks, not only the task is stopped, but there won't be any error in the console - and so the server will be offline to every other instance, but still allows players to join, resulting in players marked offline - just with the "problem" of them being online. More Information here.

Thank you for your time, if you want me to I can put these two suggested changes in a PR.

minecrafter commented 8 years ago

I stopped working with the PC edition a while back, but I feel a responsibility to fix this as this is my buggy code.

ghost commented 8 years ago

Thanks @minecrafter was about to fix this one, haha I'll update the version on spigot 👍

Moehritz commented 8 years ago

Thank you!