Unverified Commit bb11874f authored by BaiJiangJie's avatar BaiJiangJie Committed by GitHub

Merge pull request #222 from jumpserver/dev

Dev
parents d6b22f5a ff9db856
......@@ -10,3 +10,7 @@ def get_cached_volume(sid):
def set_cache_volume(sid, volume):
__volumes_cached[sid] = volume
def remove_cache_volume(sid):
__volumes_cached.pop(sid, None)
......@@ -11,7 +11,7 @@ from ..proxy import ProxyServer
from ..utils import get_logger
from ..service import app_service
from .base import BaseNamespace
from .utils import get_cached_volume
from .utils import get_cached_volume, remove_cache_volume
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
logger = get_logger(__file__)
......@@ -205,3 +205,4 @@ class ElfinderNamespace(BaseNamespace):
sftp = get_cached_volume(request.sid)
if sftp:
sftp.close()
remove_cache_volume(request.sid)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment