Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mem_reader to stop gracefully #151

Merged
merged 1 commit into from
Jul 21, 2021
Merged

Fix mem_reader to stop gracefully #151

merged 1 commit into from
Jul 21, 2021

Conversation

bmerry
Copy link
Contributor

@bmerry bmerry commented Jul 20, 2021

Previously it was directly calling stop on the stream. This is
equivalent to the user calling it, which is normally a hard stop e.g. if
it is a ring_stream, it will stop the ringbuffer without pushing any
incomplete heaps into it, or whatever flushing a subclass has
implemented in its stop_received overload.

Instead, use add_packet_state.stop, which is what's normally called
for a stop triggered by the stream itself (for example, a stop heap or
end-of-file in a pcap file), which indirectly calls stop_received on
the stream.

Previously it was directly calling `stop` on the stream. This is
equivalent to the user calling it, which is normally a hard stop e.g. if
it is a ring_stream, it will stop the ringbuffer without pushing any
incomplete heaps into it, or whatever flushing a subclass has
implemented in its `stop_received` overload.

Instead, use `add_packet_state.stop`, which is what's normally called
for a stop triggered by the stream itself (for example, a stop heap or
end-of-file in a pcap file), which indirectly calls `stop_received` on
the stream.
@bmerry bmerry merged commit 7040ca1 into master Jul 21, 2021
@bmerry bmerry deleted the fix-mem-reader-stop branch July 21, 2021 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants