sensord: delete batch latency/attribute when client is terminated unexpectedly 85/89185/1
authorkibak.yoon <kibak.yoon@samsung.com>
Mon, 8 Aug 2016 10:18:58 +0000 (19:18 +0900)
committerkibak.yoon <kibak.yoon@samsung.com>
Thu, 22 Sep 2016 13:07:58 +0000 (22:07 +0900)
- if client stops sensor explicitly, batch latency and attributes are deleted
from client information. but client is terminated unexpectedly, they are
not deleted.

Change-Id: I61475ba5979d83e17d725e3621c479640c55d86e
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
src/server/command_worker.cpp

index f8a6075..f3fd9e9 100644 (file)
@@ -214,6 +214,8 @@ bool command_worker::stopped(void *ctx)
                if (get_client_info_manager().is_started(inst->m_client_id, inst->m_sensor_id)) {
                        _W("Does not receive cmd_stop before connection broken for [%s]!!", inst->m_module->get_name());
                        inst->m_module->delete_interval(inst->m_client_id, false);
+                       inst->m_module->delete_batch(inst->m_client_id);
+                       inst->m_module->delete_attribute(inst->m_client_id);
                        inst->m_module->stop();
                }