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

network: use http.ResponseController instead of GetHTTPRequestConnection #6044

Merged
merged 3 commits into from
Jul 1, 2024
Merged
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
fix lint
  • Loading branch information
cce committed Jun 28, 2024
commit d8c29227267d71f9b14f65e8f3de121834643ba5
2 changes: 1 addition & 1 deletion rpcs/ledgerService.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,11 @@

catchpointFileSize, err := cs.Size()
if err != nil || catchpointFileSize <= 0 {
maxCatchpointFileWritingDuration += maxCatchpointFileSize * time.Second / expectedWorstUploadSpeedBytesPerSecond

Check warning on line 217 in rpcs/ledgerService.go

View check run for this annotation

Codecov / codecov/patch

rpcs/ledgerService.go#L217

Added line #L217 was not covered by tests
} else {
maxCatchpointFileWritingDuration += time.Duration(catchpointFileSize) * time.Second / expectedWorstUploadSpeedBytesPerSecond
}
if err := rc.SetWriteDeadline(time.Now().Add(maxCatchpointFileWritingDuration)); err != nil {
if wdErr := rc.SetWriteDeadline(time.Now().Add(maxCatchpointFileWritingDuration)); wdErr != nil {
logging.Base().Warnf("LedgerService.ServeHTTP unable to set connection timeout")
}

Expand Down
Loading