From 2fce523b820c6754ee9b6e9eae5f720fe54e413c Mon Sep 17 00:00:00 2001 From: AMATH <116212274+amathxbt@users.noreply.github.com> Date: Sun, 19 Apr 2026 14:11:08 +0100 Subject: [PATCH] Close old HTTP client on registry reconnect Fixes a connection leak in RegistryTEEConnection.reconnect() by closing the old HTTP client before establishing a new connection, preventing resource leaks in long-running processes. Signed-off-by: AMATH <116212274+amathxbt@users.noreply.github.com> --- ... close old HTTP client after registry reconnect | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 fix(tee): close old HTTP client after registry reconnect diff --git a/fix(tee): close old HTTP client after registry reconnect b/fix(tee): close old HTTP client after registry reconnect new file mode 100644 index 0000000..5cf2b01 --- /dev/null +++ b/fix(tee): close old HTTP client after registry reconnect @@ -0,0 +1,14 @@ +## Summary + +Fixes a connection leak in `RegistryTEEConnection.reconnect()`. + +The reconnect path was creating a new active TEE connection without closing the old HTTP client. In long-running processes that refresh or fail over repeatedly, this can leave stale clients open and slowly leak resources. + +Fixes #247 + +## Problem + +`RegistryTEEConnection.reconnect()` previously did this: + +```python +self._active = self._connect()