Merge pull request #537 from JacobBarthelmeh/sshd

better handling of want read/write cases with SFTP + SSHD
pull/538/head
David Garske 2023-07-12 12:32:54 -07:00 committed by GitHub
commit d6f0294dcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -596,7 +596,8 @@ static int SFTP_Subsystem(WOLFSSHD_CONNECTION* conn, WOLFSSH* ssh,
break;
}
if (select_ret == WS_SELECT_RECV_READY) {
if (ret == WS_WANT_READ || ret == WS_WANT_WRITE ||
select_ret == WS_SELECT_RECV_READY) {
ret = wolfSSH_worker(ssh, NULL);
error = wolfSSH_get_error(ssh);
if (ret == WS_REKEYING) {