From 96348b846254bcfd3c790ed877e6f9148c15dd7e Mon Sep 17 00:00:00 2001 From: Alexey Rybalchenko Date: Tue, 24 Mar 2020 14:42:41 +0100 Subject: [PATCH] DDS plugin: improve error message on unexpected update --- fairmq/plugins/DDS/DDS.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fairmq/plugins/DDS/DDS.cxx b/fairmq/plugins/DDS/DDS.cxx index 955a2b18..9509ff29 100644 --- a/fairmq/plugins/DDS/DDS.cxx +++ b/fairmq/plugins/DDS/DDS.cxx @@ -243,6 +243,12 @@ auto DDS::SubscribeForConnectingChannels() -> void unique_lock lk(fUpdateMutex); fUpdateCondition.wait(lk, [&]{ return fUpdatesAllowed; }); } + + if (fConnectingChans.find(channelName) == fConnectingChans.end()) { + LOG(error) << "Received an update for a connecting channel, but either no channel with given channel name exists or it has already been configured: '" << channelName << "', ignoring..."; + return; + } + string val = value; // check if it is to handle as one out of multiple values auto it = fIofN.find(channelName);