mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Fix error in new idle timeout, causing it not to deactivate properly.
This commit is contained in:
parent
4505ace90d
commit
ceb66568b1
1 changed files with 7 additions and 6 deletions
|
|
@ -129,12 +129,13 @@ def _server_maintenance():
|
|||
evennia.CHANNEL_HANDLER.update()
|
||||
|
||||
# handle idle timeouts
|
||||
reason = _("idle timeout exceeded")
|
||||
for session in (sess for sess in SESSIONS.values()
|
||||
if (now - sess.cmd_last) > _IDLE_TIMEOUT):
|
||||
if not session.account or not \
|
||||
session.account.access(session.account, "noidletimeout", default=False):
|
||||
SESSIONS.disconnect(session, reason=reason)
|
||||
if _IDLE_TIMEOUT > 0:
|
||||
reason = _("idle timeout exceeded")
|
||||
for session in (sess for sess in SESSIONS.values()
|
||||
if (now - sess.cmd_last) > _IDLE_TIMEOUT):
|
||||
if not session.account or not \
|
||||
session.account.access(session.account, "noidletimeout", default=False):
|
||||
SESSIONS.disconnect(session, reason=reason)
|
||||
|
||||
# Commenting this out, it is probably not needed
|
||||
# with CONN_MAX_AGE set. Keeping it as a reminder
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue