In pyxrootd, most calls take a timeout argument. Using ping to test if a server is alive, it does not seem to respect the timeout:

from XRootD import client
import time

fs = client.FileSystem("localhost:9999")

tic = time.monotonic()
status, _ = fs.ping(1)
toc = time.monotonic()
print(f"Got status {status} in {toc-tic:.3f}s")

tic = time.monotonic()
status, _ = fs.ping(10)
toc = time.monotonic()
print(f"Got status {status} in {toc-tic:.3f}s")

gives

Got status [ERROR] Operation expired in 15.002s
Got status [ERROR] Operation expired in 15.001s


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <xrootd/xrootd/issues/1735@github.com>

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/xrootd/xrootd/issues/1735", "url": "https://github.com/xrootd/xrootd/issues/1735", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1