Skip to content

Commit e5528cd

Browse files
committed
Fix discovery
1 parent 5b303bb commit e5528cd

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pyvolt/discovery.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,13 @@ async def use_latest_build_id(self) -> str:
463463
async def request(self, method: str, path: str, /, **kwargs) -> typing.Any:
464464
response = await self.raw_request(method, path, **kwargs)
465465
result = await utils._json_or_text(response)
466-
_L.debug('received from %s %s: %s', method, path, result)
467-
response.close()
466+
_L.debug('%s %s has received %s', method, path, result)
467+
468+
if not response.closed:
469+
tmp = response.close()
470+
if isawaitable(tmp):
471+
await tmp
472+
468473
return result
469474

470475
async def servers(self) -> DiscoverableServersPage:

0 commit comments

Comments
 (0)