Skip to content

Commit

Permalink
Differentiate between no retry and immediate retry also in the printe…
Browse files Browse the repository at this point in the history
…d offset

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
  • Loading branch information
mtrmac committed Feb 20, 2023
1 parent 4c1d856 commit 68e7485
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docker/body_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ type bodyReader struct {
firstConnectionTime time.Time

body io.ReadCloser // The currently open connection we use to read data, or nil if there is nothing to read from / close.
lastRetryOffset int64
lastRetryTime time.Time // time.Time{} if N/A
offset int64 // Current offset within the blob
lastSuccessTime time.Time // time.Time{} if N/A
lastRetryOffset int64 // -1 if N/A
lastRetryTime time.Time // time.Time{} if N/A
offset int64 // Current offset within the blob
lastSuccessTime time.Time // time.Time{} if N/A
}

// newBodyReader creates a bodyReader for request path in c.
Expand All @@ -56,7 +56,7 @@ func newBodyReader(ctx context.Context, c *dockerClient, path string, firstBody
firstConnectionTime: time.Now(),

body: firstBody,
lastRetryOffset: 0,
lastRetryOffset: -1,
lastRetryTime: time.Time{},
offset: 0,
lastSuccessTime: time.Time{},
Expand Down

0 comments on commit 68e7485

Please sign in to comment.