Wallets: Catch errors during cleanup (#1829)

* jetz aba

* catch RuntimeError
This commit is contained in:
callebtc
2023-07-21 09:50:50 +02:00
committed by GitHub
parent befb288900
commit 2d4c9f349b
7 changed files with 28 additions and 7 deletions
+4 -1
View File
@@ -44,7 +44,10 @@ class EclairWallet(Wallet):
self.client = httpx.AsyncClient(base_url=self.url, headers=self.auth)
async def cleanup(self):
await self.client.aclose()
try:
await self.client.aclose()
except RuntimeError as e:
logger.warning(f"Error closing wallet connection: {e}")
async def status(self) -> StatusResponse:
r = await self.client.post("/globalbalance", timeout=5)