Skip to content

Commit

Permalink
timeout has to be a aiohttp.ClientTimeout
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenLooman committed Aug 27, 2024
1 parent c851a11 commit 681638a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions async_upnp_client/aiohttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
ClientError,
ClientResponseError,
ClientSession,
ClientTimeout,
)

from async_upnp_client.client import UpnpRequester
Expand Down Expand Up @@ -64,7 +65,7 @@ def __init__(
self, timeout: int = 5, http_headers: Optional[Mapping[str, str]] = None
) -> None:
"""Initialize."""
self._timeout = timeout
self._timeout = (ClientTimeout(total=float(timeout)),)
self._http_headers = http_headers or {}

async def async_http_request(
Expand Down Expand Up @@ -158,7 +159,7 @@ def __init__(
"""Initialize."""
self._session = session
self._with_sleep = with_sleep
self._timeout = timeout
self._timeout = ClientTimeout(total=float(timeout))
self._http_headers = http_headers or {}

async def async_http_request(
Expand Down

0 comments on commit 681638a

Please sign in to comment.