Skip to content

Commit f7617ad

Browse files
committed
fix(lease): close sync HTTP client in AsyncTaskRunner cleanup
1 parent 3209378 commit f7617ad

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/conductor/client/automator/async_task_runner.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,13 @@ async def _cleanup(self) -> None:
202202
except (IOError, OSError) as e:
203203
logger.warning(f"Error closing async client: {e}")
204204

205+
# Close sync HTTP client used for lease heartbeats
206+
if self._sync_task_client:
207+
try:
208+
self._sync_task_client.api_client.rest_client.connection.close()
209+
except Exception:
210+
pass
211+
205212
# Clear event listeners
206213
self.event_dispatcher = None
207214

0 commit comments

Comments
 (0)