Skip to content

Commit

Permalink
Pass PersistentConnectionProvider kwargs through
Browse files Browse the repository at this point in the history
  • Loading branch information
fselmo committed Jan 23, 2024
1 parent 82ffc87 commit b9582d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web3/providers/websocket/websocket_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
Web3ValidationError,
)
from web3.providers.persistent import (
DEFAULT_PERSISTENT_CONNECTION_TIMEOUT,
PersistentConnectionProvider,
)
from web3.types import (
Expand Down Expand Up @@ -67,8 +66,9 @@ def __init__(
self,
endpoint_uri: Optional[Union[URI, str]] = None,
websocket_kwargs: Optional[Dict[str, Any]] = None,
request_timeout: Optional[float] = DEFAULT_PERSISTENT_CONNECTION_TIMEOUT,
raise_listener_task_exceptions: bool = False,
# `PersistentConnectionProvider` kwargs can be passed through
**kwargs: Any,
) -> None:
self.endpoint_uri = URI(endpoint_uri)
if self.endpoint_uri is None:
Expand Down Expand Up @@ -96,7 +96,7 @@ def __init__(
self.websocket_kwargs = merge(DEFAULT_WEBSOCKET_KWARGS, websocket_kwargs or {})
self.raise_listener_task_exceptions = raise_listener_task_exceptions

super().__init__(endpoint_uri, request_timeout=request_timeout)
super().__init__(endpoint_uri, **kwargs)

def __str__(self) -> str:
return f"Websocket connection: {self.endpoint_uri}"
Expand Down

0 comments on commit b9582d0

Please sign in to comment.