Skip to content

Commit 7dcbd62

Browse files
Fix reconnection due to websockets message size limit (#333)
1 parent bee52d7 commit 7dcbd62

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
### Fixed
1212

1313
* index: Fixed fetching `migration` operations.
14+
* tzkt: Fixed reconnection due to `websockets` message size limit.
1415

1516
## 5.0.4 - 2022-05-05
1617

src/dipdup/datasources/tzkt/datasource.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
from pysignalr.client import SignalRClient
3232
from pysignalr.exceptions import ConnectionError as WebsocketConnectionError
3333
from pysignalr.messages import CompletionMessage # type: ignore
34-
from pysignalr.transport.websocket import DEFAULT_MAX_SIZE
3534

3635
from dipdup.config import HTTPConfig
3736
from dipdup.config import ResolvedIndexConfigT
@@ -892,8 +891,8 @@ def _get_ws_client(self) -> SignalRClient:
892891
self._logger.info('Creating websocket client')
893892
self._ws_client = SignalRClient(
894893
url=f'{self._http._url}/v1/events',
895-
# NOTE: 1 MB default is not enough for big blocks
896-
max_size=DEFAULT_MAX_SIZE * 10,
894+
# NOTE: It's safe. Remove comment after updating pysignalr.
895+
max_size=None, # type: ignore
897896
)
898897

899898
self._ws_client.on_open(self._on_connect)

0 commit comments

Comments
 (0)