mirror of https://github.com/wolfSSL/wolfssh.git
API Test Fix
The echoserver will check the return on the shutdown function for success and socket error. Socket error is for the peer already having shut down their socket. This is mapped back to success so it shuts down cleanly. Add this behavior to the API test client in the test for SFTP recv read command test.pull/467/head
parent
e983ae0ad9
commit
7e99fb3aae
|
@ -938,7 +938,13 @@ static void test_wolfSSH_SFTP_SendReadPacket(void)
|
|||
}
|
||||
}
|
||||
|
||||
AssertIntEQ(wolfSSH_shutdown(ssh), WS_SUCCESS);
|
||||
argsCount = wolfSSH_shutdown(ssh);
|
||||
if (argsCount == WS_SOCKET_ERROR_E) {
|
||||
/* If the socket is closed on shutdown, peer is gone, this is OK. */
|
||||
argsCount = WS_SUCCESS;
|
||||
}
|
||||
AssertIntEQ(argsCount, WS_SUCCESS);
|
||||
|
||||
wolfSSH_free(ssh);
|
||||
wolfSSH_CTX_free(ctx);
|
||||
ThreadJoin(serThread);
|
||||
|
|
Loading…
Reference in New Issue