forked from mumble-voip/mumble
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX(server): Improve rememberchannelduration compare logic
The previous implementation of rememberchannelduration (mumble-voip#4147) acknowledged the unreliability of the last_disconnect database field. It used a workaround to set the last_disconnect field to NULL for every user on every start of the mumble server. However, with a default behavior for NULL, this created the unintended side-effect that rememberchannel was erroneously used for every user on their first connection after a server restart. This new implementation reverts the workaround of mumble-voip#4147 and uses the last_active database field to check if last_disconnect is reliable. If last_disconnect is unreliable, it will now use the server uptime and compare it to rememberchanneduration. We expect last_disconnect to be unreliable when the server was shut down while clients are still connected. Fixes mumble-voip#5639
- Loading branch information
Showing
3 changed files
with
32 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters