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

Use seconds for heartbeat processing #44

Closed regaw-leinad closed 7 years ago

regaw-leinad commented 7 years ago

I noticed while testing that I could start up multiple RedisBungee instances of the same id with no explicitly thrown errors. I figured there must already be a system in place to handle that, and after looking at it I found the source of the issue.

Even though the repeating heartbeat task was setting the timestamp in seconds, both the initial heartbeat set on plugin start, and the processing of the impostor RedisBungee instance were using milliseconds.

This PR fixes everything heartbeat-related to use the timestamp in seconds.

minecrafter commented 7 years ago

Paging @Chnkr, but LGTM

ghost commented 7 years ago

Looks good to me!

ghost commented 7 years ago

Going to deploy an update to the spigot resources later today once I'm back from work, thanks for your contribution 👍