Skip to content
Snippets Groups Projects
Commit 4cd761ee authored by Steven Murray's avatar Steven Murray
Browse files

cta/CTA#101 cta-cli hangs when cta-frontend not available

Fixed.  The cta command-line tool will now timeout after
15 seconds when trying to connect to the CTA front-end
daemons.  The previous timeout was 8 minutes.
parent 174fcc38
No related branches found
No related tags found
No related merge requests found
......@@ -127,7 +127,9 @@ int sendCommand(const int argc, const char **argv) {
// Open the xroot file reprsenting the execution of the command
{
const XrdCl::XRootDStatus openStatus = xrootFile.Open(cmdPath, XrdCl::OpenFlags::Read);
const XrdCl::Access::Mode openMode = XrdCl::Access::None;
const uint16_t openTimeout = 15; // Timeout in seconds that is rounded up to the nearest 15 seconds
const XrdCl::XRootDStatus openStatus = xrootFile.Open(cmdPath, XrdCl::OpenFlags::Read, openMode, openTimeout);
if(!openStatus.IsOK()) {
throw std::runtime_error(std::string("Failed to open ") + cmdPath + ": " + openStatus.ToStr());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment