apps, examples: keep readPeer up on a held reply

A held status from wolfSSH_AGENT_RelayChannel() is negative, and
leaving it in ret ended the outer while (ret >= 0) loop before the owed
reply was retried. Reset ret to WS_SUCCESS when the reply is held so
readPeer() returns to select() and retries it.

Issue: F-10545
pull/1261/head
John Safranek 2026-09-22 10:55:57 -07:00 committed by philljj
parent 1ed91a4be4
commit 96fdbe5238
2 changed files with 10 additions and 4 deletions

View File

@ -737,9 +737,12 @@ static THREAD_RET readPeer(void* in)
bytes = 0;
}
/* Back to select(), which is where the owed reply is
* retried. */
if (agentOwed)
* retried. A held status is not an error, so keep the
* outer loop alive. */
if (agentOwed) {
ret = WS_SUCCESS;
bytes = 0;
}
continue;
}
#endif /* WOLFSSH_AGENT */

View File

@ -562,9 +562,12 @@ static THREAD_RET readPeer(void* in)
break;
}
/* Back to select(), which is where the owed reply
* is retried. */
if (agentOwed)
* is retried. A held status is not an error, so
* keep the outer loop alive. */
if (agentOwed) {
ret = WS_SUCCESS;
bytes = 0;
}
continue;
}
#endif /* WOLFSSH_AGENT */