Skip to content

Commit

Permalink
Add documentation for custom websocket timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam McHardy committed Aug 8, 2018
1 parent 3ee20b5 commit 49dc10c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions binance/websockets.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ def __init__(self, client, user_timeout=DEFAULT_USER_TIMEOUT):
:param client: Binance API client
:type client: binance.Client
:param user_timeout: Custom websocket timeout
:type user_timeout: int
"""
threading.Thread.__init__(self)
Expand Down
7 changes: 7 additions & 0 deletions docs/websockets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ A callback to process messages would take the format
print(msg)
# do something
Set a custom timeout for the websocket connection

.. code:: python
# set a timeout of 60 seconds
bm = BinanceSocketManager(client, user_timeout=60)
Websocket Errors
----------------
Expand Down

0 comments on commit 49dc10c

Please sign in to comment.