fix: always close services (to avoid mem leaks)

This commit is contained in:
Chetan Sarva
2026-01-30 10:03:44 -05:00
parent 663950eeaf
commit 37d1256efc
3 changed files with 128 additions and 115 deletions

View File

@@ -784,6 +784,9 @@ def get_user_info(credentials: Credentials) -> Optional[Dict[str, Any]]:
except Exception as e:
logger.error(f"Unexpected error fetching user info: {e}")
return None
finally:
if service:
service.close()
# --- Centralized Google Service Authentication ---