diff options
Diffstat (limited to 'src/server/EventSource.cpp')
-rw-r--r-- | src/server/EventSource.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server/EventSource.cpp b/src/server/EventSource.cpp index cdecfd4a..ef982664 100644 --- a/src/server/EventSource.cpp +++ b/src/server/EventSource.cpp @@ -98,9 +98,11 @@ EventSource::process(PostProcessor& dest, ProcessContext& context, bool limit) } if (num_events_processed > 0) { + QueuedEvent* next = (QueuedEvent*)last->next(); + last->next(NULL); dest.append(_head.get(), last); - _head = (QueuedEvent*)last->next(); - if (!last->next()) + _head = next; + if (!next) _tail = NULL; } } |