Skip to content

Implemented inactivity timeout (2nd take) - #20

Merged
cmaglie merged 8 commits into
mainfrom
timeout-3
Jan 9, 2026
Merged

cmaglie merged 8 commits into
mainfrom
timeout-3

Conversation

@cmaglie

@cmaglie cmaglie commented Jan 8, 2026

Copy link
Copy Markdown
Member

This time I've used the context.WithCancelCause abstraction, which makes the implementation more straightforward, and does not require the assumption Close -> unlock Read on io.ReadCloser.

Other improvements made:

  • The HEAD call now lives in its own function
  • Eliminated the redundant Done channel.
  • Extensive unit-tests.

Comment thread downloader.go Resolved

@lucarin91 lucarin91 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The code seems ok, I suggest a small refactoring that may improve readability.

Comment thread downloader.go Resolved
@cmaglie cmaglie self-assigned this Jan 9, 2026
@cmaglie
cmaglie merged commit 8adf905 into main Jan 9, 2026
3 checks passed
@cmaglie
cmaglie deleted the timeout-3 branch January 9, 2026 16:55
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

Successfully merging this pull request may close these issues.

3 participants