Fix for not released thread in get_session_client

The thread that is created in the 'network_adapter' is never released,
we should use task_manager.stop() to release unnecessary resources.
If not released each connection to service will create a threadpool
that is not detected by the garbage collector.

Change-Id: Iefb2fc55caf38eed5f79aec3622c21e80be5936b
Story: 28885
This commit is contained in:
Yuval Shalev 2019-01-14 14:45:35 +02:00
parent 9b5371b688
commit 01b0dec9ae
1 changed files with 1 additions and 0 deletions

View File

@ -492,6 +492,7 @@ class CloudRegion(object):
region_name=self.region_name,
)
network_endpoint = network_adapter.get_endpoint()
network_adapter.task_manager.stop()
if not network_endpoint.rstrip().rsplit('/')[-1] == 'v2.0':
if not network_endpoint.endswith('/'):
network_endpoint += '/'