# for completion let timeout be really small
timeout = 3
try:
- if childargs and childargs[0] == 'ping':
+ if childargs and childargs[0] == 'ping' and not parsed_args.help:
return ping_monitor(cluster_handle, childargs[1], timeout)
- run_in_thread(cluster_handle.connect, timeout=timeout)
+ result = run_in_thread(cluster_handle.connect, timeout=timeout)
+ if type(result) is tuple and result[0] == -errno.EINTR:
+ print('Cluster connection interrupted or timed out', file=sys.stderr)
+ return 1
except KeyboardInterrupt:
print('Cluster connection aborted', file=sys.stderr)
return 1