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

HSV: Properly handle closed HDS connection; ensure recording streams are always freed #928

Merged
merged 3 commits into from
Jan 20, 2022

Conversation

Supereg
Copy link
Member

@Supereg Supereg commented Jan 20, 2022

♻️ Current situation

As reported in #926, shutting down hap-nodejs during an ongoing recording session will result in an unhandled erroneous state.

💡 Proposed solution

This PR introduces additional measures to gracefully exit a recording stream when encountering a closed socket!

Additionally, the "main loop" of the recording stream was refactored to ensure that resources are always freed once the stream has ended.

⚙️ Release Notes

  • Fixed an unhanded error when shutting down hap-nodejs while a HSV recording stream is still in progress.
  • Improved handling of ongoing HSV recording streams to ensure resources are always freed in erroneous states.

➕ Additional Information

This PR resolves #926.

Testing

Nothing changed.

Reviewer Nudging

--

@github-actions github-actions bot added the fix label Jan 20, 2022
@coveralls
Copy link

coveralls commented Jan 20, 2022

Pull Request Test Coverage Report for Build 1725836178

  • 9 of 36 (25.0%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.09%) to 51.832%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/lib/datastream/DataStreamServer.ts 7 13 53.85%
src/lib/camera/RecordingManagement.ts 2 23 8.7%
Files with Coverage Reduction New Missed Lines %
src/lib/camera/RecordingManagement.ts 1 51.72%
Totals Coverage Status
Change from base Build 1719886029: -0.09%
Covered Lines: 5712
Relevant Lines: 10068

💛 - Coveralls

@Supereg Supereg merged commit c74785c into beta-0.10.0 Jan 20, 2022
@Supereg Supereg deleted the fix/hsv-hds-closed-socket branch January 20, 2022 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants