Skip to content

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

Merged
dr0i merged 1 commit into
masterfrom
433-closeStreamOfLineRecordersReceiver
Jan 3, 2022
Merged

dr0i merged 1 commit into
masterfrom
433-closeStreamOfLineRecordersReceiver

Conversation

@dr0i

@dr0i dr0i commented Dec 30, 2021

Copy link
Copy Markdown
Member

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

dr0i commented Dec 30, 2021

Copy link
Copy Markdown
Member Author

@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
Copy Markdown
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