Do not leak database connections

This commit is contained in:
Zsolt Parragi 2023-04-12 14:02:28 +02:00 committed by arp102
parent 1a0f63af61
commit 5f34baee0d
2 changed files with 67 additions and 66 deletions

View File

@ -355,7 +355,8 @@ class KmipEngine(object):
def _process_batch(self, request_batch, batch_handling, batch_order):
response_batch = list()
self._data_session = self._data_store_session_factory()
with self._data_store_session_factory() as session:
self._data_session = session
for batch_item in request_batch:
error_occurred = False

View File

@ -13,4 +13,4 @@
# License for the specific language governing permissions and limitations
# under the License.
__version__ = "0.11.0dev1"
__version__ = "0.11.0.dev1"