Skip to content

Commit 639b067

Browse files
lrusakkclowes
andauthored
AsyncBeacon: fix AttributeError by using aiohttp.ClientTimeout throughout (#3784)
* AsyncBeacon: fix AttributeError by using aiohttp.ClientTimeout for timeout when making async post requests Signed-off-by: Lukas Rusak <lorusak@gmail.com> * Add newsfragment for #3784 --------- Signed-off-by: Lukas Rusak <lorusak@gmail.com> Co-authored-by: kclowes <kclowes@users.noreply.github.com>
1 parent 6b51f09 commit 639b067

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

newsfragments/3784.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Wrap timeout in ClientTimeout for AsyncBeacon post request

web3/beacon/async_beacon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ async def _async_make_post_request(
8585
) -> dict[str, Any]:
8686
uri = URI(self.base_url + endpoint_uri)
8787
return await self._request_session_manager.async_json_make_post_request(
88-
uri, json=body, timeout=self.request_timeout
88+
uri, json=body, timeout=ClientTimeout(self.request_timeout)
8989
)
9090

9191
# [ BEACON endpoints ]

0 commit comments

Comments
 (0)