diff --git a/core/plug-in/stats/StatsUDPServer.cpp b/core/plug-in/stats/StatsUDPServer.cpp index 8286ee2a..3b57d0bd 100644 --- a/core/plug-in/stats/StatsUDPServer.cpp +++ b/core/plug-in/stats/StatsUDPServer.cpp @@ -233,6 +233,12 @@ void StatsUDPServer::run() } +void StatsUDPServer::on_stop() +{ + if (sd != -1) + shutdown(sd, SHUT_RD); +} + static int msg_get_line(char*& msg_c, char* str, size_t len) { size_t l; diff --git a/core/plug-in/stats/StatsUDPServer.h b/core/plug-in/stats/StatsUDPServer.h index d58443d9..81c77a2b 100644 --- a/core/plug-in/stats/StatsUDPServer.h +++ b/core/plug-in/stats/StatsUDPServer.h @@ -55,7 +55,7 @@ class StatsUDPServer: public AmThread const struct sockaddr_in& reply_addr); void run(); - void on_stop(){} + void on_stop(); public: static StatsUDPServer* instance();