Skip to content
This repository was archived by the owner on Jul 8, 2022. It is now read-only.

Commit b306962

Browse files
committed
Push attr conf event to all clients after device restart
Attribute properties may have changed during the restart. Push the event to all registered subscribers to ensure that they get updated values.
1 parent 3950063 commit b306962

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cppapi/server/dserver.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,6 +1098,14 @@ void DServer::restart(string &d_name)
10981098
event_supplier_zmq->push_dev_intr_change_event(new_dev,false,cmds_list,atts_list);
10991099
}
11001100
}
1101+
1102+
// Attribute properties may have changed after the restart.
1103+
// Push an attribute configuration event to all registered subscribers.
1104+
1105+
for (Attribute* attr : new_dev->get_device_attr()->get_attribute_list())
1106+
{
1107+
new_dev->push_att_conf_event(attr);
1108+
}
11011109
}
11021110

11031111
//+-----------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)