Skip to content

Commit df561e1

Browse files
committed
Refactored Proxy.destroy to clarify
1 parent 4a741ae commit df561e1

File tree

1 file changed

+3
-1
lines changed
  • hazelcast/internal/asyncio_proxy

1 file changed

+3
-1
lines changed

hazelcast/internal/asyncio_proxy/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,13 @@ async def destroy(self) -> bool:
4141
``True`` if this proxy is destroyed successfully, ``False``
4242
otherwise.
4343
"""
44+
destroyed = False
4445
async with asyncio.TaskGroup() as tg: # type: ignore[attr-defined]
4546
tg.create_task(self._on_destroy())
46-
return await tg.create_task(
47+
destroyed = await tg.create_task(
4748
self._context.proxy_manager.destroy_proxy(self.service_name, self.name)
4849
)
50+
return destroyed
4951

5052
async def _on_destroy(self):
5153
pass

0 commit comments

Comments
 (0)