diff options
author | Simon Rettberg | 2020-10-13 10:23:19 +0200 |
---|---|---|
committer | Simon Rettberg | 2020-10-13 10:23:19 +0200 |
commit | 21cca5a6f6c1c8c3c09842f78c2c5a7ffdecf9e6 (patch) | |
tree | a6ae3fb530afa8fe3a1ff81a816ece61ec408544 /src | |
parent | Add usercount to RPC, simplify timing calculation (diff) | |
download | idle-daemon-21cca5a6f6c1c8c3c09842f78c2c5a7ffdecf9e6.tar.gz idle-daemon-21cca5a6f6c1c8c3c09842f78c2c5a7ffdecf9e6.tar.xz idle-daemon-21cca5a6f6c1c8c3c09842f78c2c5a7ffdecf9e6.zip |
Fix sleep time calculation for logout timeout as well
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -206,9 +206,9 @@ int main( int argc, char **argv ) if ( remaining % 30 < 10 ) { warn_showDefaultWarning( usr, WARN_LOGOUT_LOW, remaining ); } - CAP_SLEEP( remaining - ( ( remaining - 30 ) / 60 * 60 + 2 ) ); + CAP_SLEEP( ( remaining % 30 ) - 2 ); } else { - CAP_SLEEP( remaining - 299 ); + CAP_SLEEP( remaining - 305 ); } usr->logoutTime = NOW + remaining; } |