Skip to content

Commit

Permalink
Make sure the hcs pool driver drops the session after an array action
Browse files Browse the repository at this point in the history
  • Loading branch information
cvaroqui committed Nov 20, 2020
1 parent 7b4eea0 commit 774ef07
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions opensvc/drivers/pool/hcs.py
Expand Up @@ -15,8 +15,10 @@ def session(fn):
attr_name = '_fcache_' + fn.__name__

def wrapper(self, *args, **kwargs):
data = fn(self, *args, **kwargs)
self.array.close_session()
try:
data = fn(self, *args, **kwargs)
finally:
self.array.close_session()
return data

return wrapper
Expand Down

0 comments on commit 774ef07

Please sign in to comment.