Merge pull request #3582 from jumpserver/dev_session

[Update] 添加清除幽灵mysql会话
pull/3583/head
BaiJiangJie 2019-12-31 16:49:20 +08:00 committed by GitHub
commit 02650c9cdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -251,7 +251,7 @@ class Session(OrgModelMixin):
return cls.objects.filter(is_finished=False)
def is_active(self):
if self.protocol in ['ssh', 'telnet', 'rdp']:
if self.protocol in ['ssh', 'telnet', 'rdp', 'mysql']:
key = self.ACTIVE_CACHE_KEY_PREFIX.format(self.id)
return bool(cache.get(key))
return True