Skip to content

Commit 8628ec4

Browse files
committed
session_connection_timeout should be inf by default
1 parent 5fdd1db commit 8628ec4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

neo4j/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ class WorkspaceConfig(Config):
264264
"""
265265

266266
#: Session Connection Timeout
267-
session_connection_timeout = 120.0 # seconds
267+
session_connection_timeout = float("inf") # seconds
268268
# The maximum amount of time to wait for a session to obtain a usable
269269
# read/write connection. This includes everything necessary for this to
270270
# happen. Including fetching routing tables, opening sockets, etc.

neo4j/io/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,7 @@ def __repr__(self):
978978
@contextmanager
979979
def _refresh_lock_deadline(self, deadline):
980980
timeout = deadline.to_timeout()
981-
if timeout == float("inf"):
981+
if timeout is None:
982982
timeout = -1
983983
if not self.refresh_lock.acquire(timeout=timeout):
984984
raise ClientError(

tests/unit/test_conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
}
5757

5858
test_session_config = {
59-
"session_connection_timeout": float("inf"),
59+
"session_connection_timeout": 180.0,
6060
"connection_acquisition_timeout": 60.0,
6161
"max_transaction_retry_time": 30.0,
6262
"initial_retry_delay": 1.0,

0 commit comments

Comments
 (0)