mirror of https://github.com/wolfSSL/wolfssh.git
After sending the shutdown messages, client needs to wait for the server to respond before closing its socket.
parent
3c8b2a622a
commit
f95e0995cc
|
@ -1142,6 +1142,13 @@ THREAD_RETURN WOLFSSH_THREAD client_test(void* args)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
ret = wolfSSH_shutdown(ssh);
|
ret = wolfSSH_shutdown(ssh);
|
||||||
|
if (ret != WS_SUCCESS) {
|
||||||
|
err_sys("Sending the shutdown messages failed.");
|
||||||
|
}
|
||||||
|
ret = wolfSSH_worker(ssh, NULL);
|
||||||
|
if (ret != WS_SUCCESS) {
|
||||||
|
err_sys("Failed to listen for close messages from the peer.");
|
||||||
|
}
|
||||||
WCLOSESOCKET(sockFd);
|
WCLOSESOCKET(sockFd);
|
||||||
wolfSSH_free(ssh);
|
wolfSSH_free(ssh);
|
||||||
wolfSSH_CTX_free(ctx);
|
wolfSSH_CTX_free(ctx);
|
||||||
|
|
Loading…
Reference in New Issue