Skip to content

Commit 68e7485

Browse files
committed
Differentiate between no retry and immediate retry also in the printed offset
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
1 parent 4c1d856 commit 68e7485

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docker/body_reader.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ type bodyReader struct {
3434
firstConnectionTime time.Time
3535

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

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

5858
body: firstBody,
59-
lastRetryOffset: 0,
59+
lastRetryOffset: -1,
6060
lastRetryTime: time.Time{},
6161
offset: 0,
6262
lastSuccessTime: time.Time{},

0 commit comments

Comments
 (0)