- std::map<char*, std::shared_ptr<Events_Message>>::iterator aMyGroup =
- myGroups.find(theID.eventText());
- if (aMyGroup != myGroups.end()) { // really sends
- myFlushed.insert(theID.myID);
+ std::map<char*, std::shared_ptr<Events_Message> >::iterator aMyGroup;
+ for(aMyGroup = myGroups.find(theID.eventText());
+ aMyGroup != myGroups.end(); aMyGroup = myGroups.find(theID.eventText()))
+ { // really sends
+ bool aWasFlushed = myFlushed.find(theID.myID) != myFlushed.end();
+ if (!aWasFlushed)
+ myFlushed.insert(theID.myID);