Skip to content

Commit

Permalink
Merge pull request #151 from ska-sa/fix-mem-reader-stop
Browse files Browse the repository at this point in the history
Fix mem_reader to stop gracefully
  • Loading branch information
bmerry committed Jul 21, 2021
2 parents bfd2d12 + 3342eeb commit 7040ca1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/recv_mem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ mem_reader::mem_reader(
get_io_service().post([this] {
mem_to_stream(get_stream_base(), this->ptr, this->length);
// There will be no more data, so we can stop the stream immediately.
get_stream_base().stop();
stream_base::add_packet_state state(get_stream_base());
state.stop();
stopped();
});
}
Expand Down

0 comments on commit 7040ca1

Please sign in to comment.