Merge pull request #393 from ejohnstown/sftp-rxd

pull/396/head
Anthony Hu 2022-03-21 17:55:15 -04:00 committed by GitHub
commit 312b9d1d7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -1156,6 +1156,9 @@ static int sftp_worker(thread_ctx_t* threadCtx)
if (error == WS_WANT_READ || error == WS_WANT_WRITE)
ret = WS_WANT_READ;
if (error == WS_CHAN_RXD)
ret = WS_CHAN_RXD;
if (ret == WS_FATAL_ERROR && error == 0) {
WOLFSSH_CHANNEL* channel =
wolfSSH_ChannelNext(threadCtx->ssh, NULL);

View File

@ -1463,6 +1463,7 @@ int wolfSSH_SFTP_read(WOLFSSH* ssh)
if (ssh->error != WS_WANT_READ &&
ssh->error != WS_WANT_WRITE &&
ssh->error != WS_REKEYING &&
ssh->error != WS_CHAN_RXD &&
ssh->error != WS_WINDOW_FULL)
wolfSSH_SFTP_ClearState(ssh, STATE_ID_RECV);
return WS_FATAL_ERROR;