[Update] 添加清除幽灵rdp会话

This commit is contained in:
BaiJiangJie
2019-12-31 15:38:10 +08:00
parent c084412e53
commit 131496bfee

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']:
if self.protocol in ['ssh', 'telnet', 'rdp']:
key = self.ACTIVE_CACHE_KEY_PREFIX.format(self.id)
return bool(cache.get(key))
return True