Compare commits

..
1 Commits
Author SHA1 Message Date
Niko Storni 62dfdc1adb fix possible resource leak 2019-12-14 05:49:25 +01:00
+3 -1
View File
@@ -236,8 +236,10 @@ func (v *YoutubeVideo) download(useIPv6 bool) error {
time.Sleep(ip_manager.IPCooldownPeriod)
sourceAddress, err = v.pool.GetIP()
if err == nil { //TODO: This is possibly not 100% right, but it works so I'm not touching it...
if err == nil {
break
} else if !errors.Is(err, ip_manager.ErrAllThrottled) {
return err
}
}
} else {