Skip to content

Commit f39fb3d

Browse files
authored
Remove default timeout (#106)
* set default timeout to 0 * add timeout entry in docstring
1 parent 9ae8a42 commit f39fb3d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/fsspec_xrootd/xrootd.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ async def _open(self, url: str, timeout: int) -> Any: # client.File
223223
class XRootDFileSystem(AsyncFileSystem): # type: ignore[misc]
224224
protocol = "root"
225225
root_marker = "/"
226-
default_timeout = 60
226+
default_timeout = 0
227227
async_impl = True
228228
default_max_num_chunks = 1024
229229
default_max_chunk_size = 2097136
@@ -259,6 +259,9 @@ def __init__(
259259
If given and locate_all_sources is True, fsspec will only reject any file host
260260
not in this list. Entries should be of the form ie: `cmsxrootd-site1.fnal.gov`
261261
(no port number)
262+
timeout = 0: int
263+
Sets the xrootd client timeout in seconds. 0 means no timeout.
264+
This is option is part of fsspec storage_options.
262265
"""
263266
super().__init__(self, asynchronous=asynchronous, loop=loop, **storage_options)
264267
self.timeout = storage_options.get("timeout", XRootDFileSystem.default_timeout)

0 commit comments

Comments
 (0)