[ion] Actually send None events to the destination journal

Said journal will most likely ignore it, but it gives it the opporunity
to do something about it.
This commit is contained in:
Romain Goyet
2021-02-25 15:25:52 -05:00
committed by Léa Saviot
parent a6b13185ab
commit c66db8c98d
2 changed files with 4 additions and 2 deletions

View File

@@ -134,7 +134,7 @@ Event getEvent(int * timeout) {
}
}
Event e = innerGetEvent(timeout);
if (sDestinationJournal != nullptr && e != None) {
if (sDestinationJournal != nullptr) {
sDestinationJournal->pushEvent(e);
}
return e;

View File

@@ -11,7 +11,9 @@ namespace Journal {
class QueueJournal : public Ion::Events::Journal {
public:
void pushEvent(Ion::Events::Event e) override {
m_eventStorage.push(e);
if (e != Ion::Events::None) {
m_eventStorage.push(e);
}
}
virtual Ion::Events::Event popEvent() override {
if (isEmpty()) {