diff options
author | Pär Tojkander <par.tojkander@assaabloy.com> | 2018-10-11 11:03:22 +0200 |
---|---|---|
committer | Pär Tojkander <par.tojkander@assaabloy.com> | 2018-10-11 11:03:22 +0200 |
commit | b65f8ba4b935528a56c751c2f1de7a7d2d12f17e (patch) | |
tree | a9a6f46cab23439b08c8504f239447cca8895f34 /websocket | |
parent | 1d6ffdb1093a58ee8d9caeb468ad0b48dc143c49 (diff) | |
download | websocket-client-b65f8ba4b935528a56c751c2f1de7a7d2d12f17e.tar.gz |
Rename 'redirect_threshold' to 'redirect_limit'
Diffstat (limited to 'websocket')
-rw-r--r-- | websocket/_core.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/websocket/_core.py b/websocket/_core.py index 04f1fcb..a85fc78 100644 --- a/websocket/_core.py +++ b/websocket/_core.py @@ -210,7 +210,7 @@ class WebSocket(object): "http_proxy_auth" - http proxy auth information. tuple of username and password. default is None - "redirect_threshold" -> number of redirects to follow. + "redirect_limit" -> number of redirects to follow. "subprotocols" - array of available sub protocols. default is None. "socket" - pre-initialized stream socket. @@ -221,7 +221,7 @@ class WebSocket(object): try: self.handshake_response = handshake(self.sock, *addrs, **options) - for attempt in range(options.pop('redirect_threshold', 3)): + for attempt in range(options.pop('redirect_limit', 3)): if self.handshake_response.status in SUPPORTED_REDIRECT_STATUSES: url = self.handshake_response.headers['location'] self.sock.close() @@ -490,7 +490,7 @@ def create_connection(url, timeout=None, class_=WebSocket, **options): tuple of username and password. default is None "enable_multithread" -> enable lock for multithread. - "redirect_threshold" -> number of redirects to follow. + "redirect_limit" -> number of redirects to follow. "sockopt" -> socket options "sslopt" -> ssl option "subprotocols" - array of available sub protocols. |