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

Call LineRecorder receiver's closeStream() (#433) #435

Merged
merged 1 commit into from
Jan 3, 2022

Conversation

dr0i
Copy link
Member

@dr0i dr0i commented Dec 30, 2021

Under some circumstances (e.g. if the JVM is not stopped after processing)
the streams of receivers connected to LineRecorder are not closed, resulting
in empty or missing output data.

By switching from "implements ObjectPipe" to "extends DefaultObjectPipe" the "DefaultSender"
is used which implements the Sender interface. This ensures the proper closing of streams.

  • complement test

See #433.

Under some circumstances (e.g. if the JVM is not stopped after processing)
the streams of receivers connected to LineRecorder are not closed, resulting
in empty or missing output data.

By switching from "implements ObjectPipe" to "extends DefaultObjectPipe" in LineRecorde
the "DefaultSender" is used which implements the Sender interface. This ensures the
proper closing of streams.

- complement test
@dr0i
Copy link
Member Author

dr0i commented Dec 30, 2021

@blackwinter I do like this approach much more than #434. What do you think?

@dr0i dr0i self-assigned this Dec 30, 2021
@dr0i dr0i linked an issue Dec 30, 2021 that may be closed by this pull request
@dr0i dr0i requested review from fsteeg and removed request for blackwinter January 3, 2022 11:13
@dr0i dr0i merged commit 72617a0 into master Jan 3, 2022
@dr0i dr0i deleted the 433-closeStreamOfLineRecordersReceiver branch January 3, 2022 13:55
*/
protected ObjectReceiver<String> getReceiver() {
return receiver;
public void onResetStream() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: I think this should be protected.

dr0i added a commit that referenced this pull request Jan 11, 2022
Some "@OverRide" methods used the "public" modifier, which is not necessary. Looking at
the base classes of these classes a "protected" modifier was used, so "protected" seems
to be intentionally.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Close LineRecorder receiver's stream when closing LineRecorder
3 participants