diff --git a/src/tcp_server.inl b/src/tcp_server.inl index a515fb6..bd73c3f 100644 --- a/src/tcp_server.inl +++ b/src/tcp_server.inl @@ -573,6 +573,7 @@ void TCPServer::on_connect(uv_connect_t* req, int LOGWARN(5, "failed to connect to " << static_cast(client->m_addrString) << ", error " << uv_err_name(status)); } server->on_connect_failed(client->m_isV6, client->m_addr, client->m_port); + uv_close(reinterpret_cast(&client->m_socket), nullptr); server->m_preallocatedClients.push_back(client); return; }