We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05958bb commit 042b761Copy full SHA for 042b761
tests/integration/go_ethereum/test_goethereum_ws/test_async_iterator_w3.py
@@ -27,7 +27,10 @@ async def async_w3(start_geth_process_and_yield_port):
27
endpoint_uri = f"ws://127.0.0.1:{port}"
28
# async iterator pattern
29
async for w3 in AsyncWeb3(WebSocketProvider(endpoint_uri, request_timeout=10)):
30
- return w3
+ yield w3
31
+ # we won't be iterating to the next w3 instance, so disconnect explicitly
32
+ await w3.provider.disconnect()
33
+ break
34
35
36
class TestGoEthereumAsyncWeb3ModuleTest(GoEthereumAsyncWeb3ModuleTest):
0 commit comments