From bc0fb3503983d7ca852418f81ed8347b8a5eeaf2 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 3 Jul 2025 14:56:51 -0400 Subject: [PATCH] MT#63171 StatsUDPServer: use correct FD flag Zero is a valid file descriptor. Use -1 as flag. Change-Id: I9347e38ea51d0e9274941e8e888432b990f55c5a (cherry picked from commit e684718807f8554f47ead2f4c1668a5bd85b86d3) (cherry picked from commit 5adfed016de54221581b49f9d3f63cd93faf6777) --- core/plug-in/stats/StatsUDPServer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/plug-in/stats/StatsUDPServer.cpp b/core/plug-in/stats/StatsUDPServer.cpp index c78dc107..2b01ddb2 100644 --- a/core/plug-in/stats/StatsUDPServer.cpp +++ b/core/plug-in/stats/StatsUDPServer.cpp @@ -114,14 +114,14 @@ StatsUDPServer* StatsUDPServer::instance() } StatsUDPServer::StatsUDPServer() - : sd(0) + : sd(-1) { sc = AmSessionContainer::instance(); } StatsUDPServer::~StatsUDPServer() { - if(sd) + if (sd != -1) close(sd); }