Plug db session leak
This commit is contained in:
parent
27374e2ad4
commit
c287e1dae7
@ -43,7 +43,7 @@ class ReferenceKeystore(Keystore):
|
||||
self.db_session = sessionmaker(bind=self.db_engine)()
|
||||
for s in self.schema:
|
||||
self.db_session.execute(s)
|
||||
self.db_session.commit()
|
||||
self.db_session.commit()
|
||||
self.symmetric_key = kwargs.get('symmetric_key')
|
||||
|
||||
|
||||
@ -62,7 +62,9 @@ class ReferenceKeystore(Keystore):
|
||||
try:
|
||||
k = r.first()[0]
|
||||
except TypeError:
|
||||
self.db_session.rollback()
|
||||
raise UnknownAccountError(address)
|
||||
self.db_session.commit()
|
||||
return self._decrypt(k, password)
|
||||
|
||||
|
||||
|
@ -24,6 +24,7 @@ config_dir = '.'
|
||||
|
||||
db = None
|
||||
signer = None
|
||||
session = None
|
||||
chainId = 8995
|
||||
socket_path = '/run/crypto-dev-signer/jsonrpc.ipc'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user