1
0
mirror of synced 2025-04-26 14:28:51 +03:00

Fixed ClientStop test error.

This commit is contained in:
yhirose 2020-06-14 03:01:41 +00:00
parent e022b8b80b
commit 0743d78c9b

View File

@ -5054,7 +5054,9 @@ inline void Client::stop() {
std::lock_guard<std::mutex> guard(socket_mutex_);
if (socket_.is_open()) {
detail::shutdown_socket(socket_.sock);
std::this_thread::sleep_for(std::chrono::milliseconds(10));
close_socket(socket_, true);
std::this_thread::sleep_for(std::chrono::milliseconds(10));
}
}
@ -5562,7 +5564,6 @@ inline bool SSLClient::initialize_ssl(Socket &socket) {
inline void SSLClient::close_socket(Socket &socket, bool process_socket_ret) {
detail::close_socket(socket.sock);
socket_.sock = INVALID_SOCKET;
std::this_thread::sleep_for(std::chrono::milliseconds(10));
if (socket.ssl) {
detail::ssl_delete(ctx_mutex_, socket.ssl, process_socket_ret);
socket_.ssl = nullptr;