Skip to content

Commit

Permalink
fix: typos
Browse files Browse the repository at this point in the history
  • Loading branch information
melbahja committed Aug 16, 2020
1 parent b136c2c commit 853a4de
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions download.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (d *Download) Init() (err error) {
d.Concurrency = 20
}

// Set default min concurrency to 2.
// Set default min concurrency to 4.
if d.Concurrency <= 2 {
d.Concurrency = 4
}
Expand Down Expand Up @@ -256,7 +256,7 @@ func (d *Download) Start() error {
return nil
}

// RunProgress runs ProgressFunc based on Interval and updates lastSize
// RunProgress runs ProgressFunc based on Interval and updates lastSize.
func (d *Download) RunProgress(fn ProgressFunc) {

// Set default interval.
Expand Down Expand Up @@ -417,11 +417,11 @@ func (d *Download) merge(ctx context.Context) error {
// Non-blocking chunk close.
go chunk.Close()

// Sync dest file.
file.Sync()

// Put chunk in chunk pool
ChunkPool.Put(&d.chunks[i])

// Sync dest file.
file.Sync()
}

return nil
Expand Down

0 comments on commit 853a4de

Please sign in to comment.