Skip to content

Commit 987ed38

Browse files
authored
Merge pull request #1 from linc-technologies/fix/go-routine-leak
fix: close chan to prevent go routine leak
2 parents 05d0564 + 3464573 commit 987ed38

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

uploader.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ func (u *Uploader) Offset() int64 {
4242

4343
// Upload uploads the entire body to the server.
4444
func (u *Uploader) Upload() error {
45+
defer close(u.notifyChan)
4546
for u.offset < u.upload.size && !u.aborted {
4647
err := u.UploadChunck()
4748

0 commit comments

Comments
 (0)