diff --git a/apps/wolfssh/wolfssh.c b/apps/wolfssh/wolfssh.c index 79d84cd4..409903e2 100644 --- a/apps/wolfssh/wolfssh.c +++ b/apps/wolfssh/wolfssh.c @@ -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 */ diff --git a/examples/client/client.c b/examples/client/client.c index 04765c52..869ae54a 100644 --- a/examples/client/client.c +++ b/examples/client/client.c @@ -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 */