MT#63171 StatsUDPServer: facilitate shutdown

Wake up thread from blocking on recvfrom() so that it can shut down when
requested to.

Change-Id: Iaa05caf93877363c162d56791a6e24bdfb809094
mr13.5
Richard Fuchs 1 year ago
parent 03c6196c84
commit 392cd9d759

@ -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;

@ -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();

Loading…
Cancel
Save