Make websocket timeout configurable #372
-
I am having issues with an endpoint that basically hangs and my job stays there forever waiting for timeout as timeout is currently hardcoded to 2**32, can we have a constructor param to specify default timeout? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
It is actually already possible to provide all available options when creating the websocket connection. There are some defaults atm, but nothing is hardcoded. For example: substrate = SubstrateInterface(url='ws://127.0.0.1:9944', ws_options={'timeout': 10}) For all available options, see: https://websocket-client.readthedocs.io/en/latest/core.html#websocket._core.create_connection |
Beta Was this translation helpful? Give feedback.
-
Awesome, at least now searching for "timeout" in the issues might help someone :) |
Beta Was this translation helpful? Give feedback.
It is actually already possible to provide all available options when creating the websocket connection. There are some defaults atm, but nothing is hardcoded.
For example:
For all available options, see: https://websocket-client.readthedocs.io/en/latest/core.html#websocket._core.create_connection