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

Dead Lock Issues BlockingDownloadContentStream #189

Closed
tsroman opened this issue Apr 5, 2024 · 1 comment
Closed

Dead Lock Issues BlockingDownloadContentStream #189

tsroman opened this issue Apr 5, 2024 · 1 comment

Comments

@tsroman
Copy link

tsroman commented Apr 5, 2024

Method Read(byte[] buffer, int offset, int count) will dead block your thread when Content Stream is fully consumed (IsCompleted)
Since there is nothing to read [readCount] will always be 0

The simple fix is just to check for completion.
Replace line 150 with
while (readCount == 0 && IsCompleted == false)

Also, in line 114 I get a pragma warning CS0197 which appears as an error in my JetBrains Rider code editor. (It's just distraction)
Would be good if this gets wrapped in #pragma warning disable/restore CS0197 block.

@Benedicht
Copy link
Owner

Thank you for your report, the fixes will be included in the next version!

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

No branches or pull requests

2 participants