mirror of https://github.com/wolfSSL/wolfssh.git
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-10545pull/1261/head
parent
1ed91a4be4
commit
96fdbe5238
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in New Issue