diff --git a/apps/reg_agent/RegistrationAgent.cpp b/apps/reg_agent/RegistrationAgent.cpp index 531e9b19..a02dc25d 100644 --- a/apps/reg_agent/RegistrationAgent.cpp +++ b/apps/reg_agent/RegistrationAgent.cpp @@ -183,7 +183,7 @@ void RegThread::run() { /* wait for sems to completely start up */ sleep(2); - while (true) + while (!stop_requested()) { for (vector::iterator it = registrations.begin(); it != registrations.end(); @@ -201,7 +201,7 @@ void RegThread::run() { } void RegThread::on_stop() { - DBG("not stopping...\n"); + DBG("stopping reg_agent thread.\n"); } void RegThread::postEvent(AmEvent* ev) {