Merge pull request #255 from ejohnstown/discon

SCP Disconnect
pull/258/head
Chris Conlon 2020-05-08 16:44:08 -06:00 committed by GitHub
commit 27f5be3db7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -868,10 +868,10 @@ int wolfSSH_shutdown(WOLFSSH* ssh)
ret = SendChannelEof(ssh, ssh->channelList->peerChannel); ret = SendChannelEof(ssh, ssh->channelList->peerChannel);
if (ret == WS_SUCCESS) if (ret == WS_SUCCESS)
ret = SendChannelClose(ssh, ssh->channelList->peerChannel); ret = SendChannelExit(ssh, ssh->channelList->peerChannel, 0);
if (ret == WS_SUCCESS) if (ret == WS_SUCCESS)
ret = SendDisconnect(ssh, WOLFSSH_DISCONNECT_BY_APPLICATION); ret = SendChannelClose(ssh, ssh->channelList->peerChannel);
if (ssh != NULL && ssh->channelList == NULL) { if (ssh != NULL && ssh->channelList == NULL) {
WLOG(WS_LOG_DEBUG, "channel list was already removed"); WLOG(WS_LOG_DEBUG, "channel list was already removed");

View File

@ -85,7 +85,7 @@ int DoScpSink(WOLFSSH* ssh)
if ( (ret = ReceiveScpMessage(ssh)) < WS_SUCCESS) { if ( (ret = ReceiveScpMessage(ssh)) < WS_SUCCESS) {
if (ret == WS_EOF) { if (ret == WS_EOF) {
ret = WS_SUCCESS; ret = wolfSSH_shutdown(ssh);
ssh->scpState = SCP_DONE; ssh->scpState = SCP_DONE;
break; break;
} }