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

Fix regression: termination of long downloads after StreamTimeout seconds #141

Merged
merged 5 commits into from
Dec 12, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
When timeout no longer needs to be enforced, no need to schedule a br…
…oadcast.
  • Loading branch information
notsure2 committed Dec 7, 2020
commit 3d103e728ce8abf8fd4d0a17f725c1bcdd290803
2 changes: 1 addition & 1 deletion internal/multiplex/datagramBufferedPipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (d *datagramBufferedPipe) WriteTo(w io.Writer) (n int64, err error) {
if !d.rDeadline.IsZero() {
d.broadcastAfter(time.Until(d.rDeadline))
}
} else {
} else if enforceTimeout {
d.broadcastAfter(d.wtTimeout)
}

Expand Down
2 changes: 1 addition & 1 deletion internal/multiplex/streamBufferedPipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (p *streamBufferedPipe) WriteTo(w io.Writer) (n int64, err error) {
if !p.rDeadline.IsZero() {
p.broadcastAfter(time.Until(p.rDeadline))
}
} else {
} else if enforceTimeout {
p.broadcastAfter(p.wtTimeout)
}

Expand Down