Skip to content

Commit db551db

Browse files
committed
Request timeout is overwritten when a http_client is not specified.
1 parent 25d38b3 commit db551db

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

arango/client.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,8 @@ class ArangoClient:
5454
str: Path to a custom CA bundle file or directory.
5555
:type verify_override: Union[bool, str, None]
5656
:param request_timeout: This is the default request timeout (in seconds)
57-
for http requests issued by the client. The default value is -1.
58-
Setting this parameter to any other value, will overwrite your
59-
request timeout set in the http client.
57+
for http requests issued by the client if the parameter http_client is
58+
not secified. The default value is 60.
6059
None: No timeout.
6160
int: Timeout value in seconds.
6261
:type request_timeout: Any
@@ -71,7 +70,7 @@ def __init__(
7170
serializer: Callable[..., str] = lambda x: dumps(x),
7271
deserializer: Callable[[str], Any] = lambda x: loads(x),
7372
verify_override: Union[bool, str, None] = None,
74-
request_timeout: Any = -1,
73+
request_timeout: Any = 60,
7574
) -> None:
7675
if isinstance(hosts, str):
7776
self._hosts = [host.strip("/") for host in hosts.split(",")]
@@ -92,7 +91,7 @@ def __init__(
9291
self._http = http_client or DefaultHTTPClient()
9392
# Sets the request timeout.
9493
# This call can only happen AFTER initializing the http client.
95-
if request_timeout != -1:
94+
if http_client is None:
9695
self.request_timeout = request_timeout
9796

9897
self._serializer = serializer

0 commit comments

Comments
 (0)