-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Description
Hi, I'm facing one goroutine leak issue when uploading.
// Waits for a signal to broadcast to all subscribers
func (u *Uploader) broadcastProgress() {
for _ = range u.notifyChan {
for _, c := range u.uploadSubs {
c <- *u.upload
}
}
}
// NewUploader creates a new Uploader.
func NewUploader(client *Client, url string, upload *Upload, offset int64) *Uploader {
notifyChan := make(chan bool)
uploader := &Uploader{
client,
url,
upload,
offset,
false,
nil,
notifyChan,
}
go uploader.broadcastProgress()
return uploader
}
the notifyChan will not be closed in any case, so the broadcastProgress goroutine is hanging, also mentioned here #55.
can anyone look into this?
Metadata
Metadata
Assignees
Labels
No labels