diff --git a/src/agent/CMakeLists.txt b/src/agent/CMakeLists.txt index f264a8bfa..6a1cc755b 100644 --- a/src/agent/CMakeLists.txt +++ b/src/agent/CMakeLists.txt @@ -18,7 +18,7 @@ if(CMAKE_HOST_WIN32 AND NOT DEFINED VCPKG_TARGET_TRIPLET) set(VCPKG_TARGET_TRIPLET "x64-windows-static" CACHE STRING "vcpkg triplet for the self-contained agent build") endif() -project(HsmAgent VERSION 0.5.27 LANGUAGES CXX) +project(HsmAgent VERSION 0.5.28 LANGUAGES CXX) if(MSVC) # Static CRT (/MT) to match the static triplet — the exe must run on a clean machine with no VC++ diff --git a/src/native/collector/CMakeLists.txt b/src/native/collector/CMakeLists.txt index d9362a9fb..2894e1a95 100644 --- a/src/native/collector/CMakeLists.txt +++ b/src/native/collector/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.21) # VERSION tracks the C ABI semver (HSM_COLLECTOR_VERSION_* in include/hsm_collector/hsm_collector.h); # keep the two in sync. It feeds the find_package(hsm_collector x.y) version check (#1100). -project(HsmCollectorNative VERSION 0.6.1 LANGUAGES CXX) +project(HsmCollectorNative VERSION 0.6.2 LANGUAGES CXX) # --------------------------------------------------------------------------- # Target topology (epic #1093 / issue #1095 §1 — "core lib / C ABI lib / C++ diff --git a/src/native/collector/include/hsm_collector/hsm_collector.h b/src/native/collector/include/hsm_collector/hsm_collector.h index 18ff4bf91..fb009adff 100644 --- a/src/native/collector/include/hsm_collector/hsm_collector.h +++ b/src/native/collector/include/hsm_collector/hsm_collector.h @@ -18,7 +18,7 @@ extern "C" reported as the ".module/Collector version" sensor. */ #define HSM_COLLECTOR_VERSION_MAJOR 0 #define HSM_COLLECTOR_VERSION_MINOR 6 -#define HSM_COLLECTOR_VERSION_PATCH 1 +#define HSM_COLLECTOR_VERSION_PATCH 2 #define HSM_COLLECTOR_VERSION \ ((HSM_COLLECTOR_VERSION_MAJOR * 10000) + (HSM_COLLECTOR_VERSION_MINOR * 100) + HSM_COLLECTOR_VERSION_PATCH) diff --git a/src/native/collector/src/hsm_collector.cpp b/src/native/collector/src/hsm_collector.cpp index 7baeac383..584e70933 100644 --- a/src/native/collector/src/hsm_collector.cpp +++ b/src/native/collector/src/hsm_collector.cpp @@ -4661,9 +4661,23 @@ namespace // to one line per window (the batch is re-enqueued by the dispatcher — the retry itself is // not logged, matching the queue's silent re-enqueue). if (!response.IsSuccess()) - LogError( - "Failed to send " + std::to_string(batch.size()) + " value(s): HTTP " + - std::to_string(response.status_code) + (response.error.empty() ? "" : " " + response.error)); + { + const std::string msg = "Failed to send " + std::to_string(batch.size()) + " value(s): HTTP " + + std::to_string(response.status_code) + + (response.error.empty() ? "" : " " + response.error); + // A send whose in-flight POST was cancelled by a graceful stop is expected, not an + // error — log it at Debug (same treatment as the stop-drop). A genuine failure while + // running still logs at Error (deduplicated). + bool cancelled_by_stop; + { + std::lock_guard guard(hang_mutex_); + cancelled_by_stop = send_cancelled_; + } + if (cancelled_by_stop) + LogMessage(HSM_LOG_LEVEL_DEBUG, msg); + else + LogError(msg); + } return response.IsSuccess(); }