Fix regression with idle_timout not correctly closing connection. Fix errors due to Portal and Server trying to send to non-existing sessions after connection closes.
This commit is contained in:
parent
2737d37633
commit
67411d006d
2 changed files with 7 additions and 3 deletions
|
|
@ -87,7 +87,7 @@ def _portal_maintenance():
|
|||
reason = "Idle timeout exceeded, disconnecting."
|
||||
for session in [sess for sess in PORTAL_SESSIONS.values()
|
||||
if (now - sess.cmd_last) > _IDLE_TIMEOUT]:
|
||||
session.data_out(text=[[reason], {}])
|
||||
session.disconnect(reason=reason)
|
||||
PORTAL_SESSIONS.disconnect(session)
|
||||
|
||||
if _IDLE_TIMEOUT > 0:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue