rnsh: don't wait forever for rns operations when timeout isn't set

This commit is contained in:
Jeremy O'Brien
2026-05-18 12:34:58 -04:00
parent 939f30fef2
commit ebf544d335
+2
View File
@@ -214,6 +214,8 @@ async def _handle_error(errmsg: RNS.MessageBase):
async def initiate(configdir: str, rnsconfigdir:str, identitypath: str, verbosity: int, quietness: int, noid: bool, destination: str,
timeout: float, command: [str] | None = None):
global _finished, _link
if timeout is None:
timeout = RNS.Transport.PATH_REQUEST_TIMEOUT
with process.TTYRestorer(sys.stdin.fileno()) as ttyRestorer:
loop = asyncio.get_running_loop()
state = InitiatorState.IS_INITIAL