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

Commit 773abdb

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 bad0c60 commit 773abdb

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
@@ -1119,6 +1119,14 @@ void DServer::restart(std::string &d_name)
11191119
event_supplier_zmq->push_dev_intr_change_event(new_dev,false,cmds_list,atts_list);
11201120
}
11211121
}
1122+
1123+
// Attribute properties may have changed after the restart.
1124+
// Push an attribute configuration event to all registered subscribers.
1125+
1126+
for (Attribute* attr : new_dev->get_device_attr()->get_attribute_list())
1127+
{
1128+
new_dev->push_att_conf_event(attr);
1129+
}
11221130
}
11231131

11241132
//+-----------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)