Skip to content

Commit 8317e8e

Browse files
committed
Fix cleaning response object resource
1 parent 735d090 commit 8317e8e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

karcher/karcher.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ async def close(self):
8686
self._mqtt = None
8787

8888
if self._http is not None:
89-
if self._http_external:
89+
if not self._http_external:
9090
self._http.close()
9191
self._http = None
9292

@@ -160,6 +160,7 @@ async def _download(self, url) -> bytes:
160160

161161
async def _process_response(self, resp: aiohttp.ClientResponse, prop=None) -> Any:
162162
if resp.status != 200:
163+
resp.close()
163164
raise KarcherHomeException(-1,
164165
'HTTP error: ' + str(resp.status))
165166
data = await resp.json()

0 commit comments

Comments
 (0)