fixed no response crash
This commit is contained in:
6
main.go
6
main.go
@@ -141,6 +141,12 @@ func (m UploadManager) pingWorker() error {
|
||||
return err
|
||||
}
|
||||
|
||||
if stats == nil {
|
||||
log.Warningf("ping to %s failed: %v", conf.Host, "no response")
|
||||
time.Sleep(time.Duration(conf.Interval) * time.Minute)
|
||||
continue
|
||||
}
|
||||
|
||||
log.Infof("ping %s over threshold detected, starting extended pings...", stats.AvgRtt)
|
||||
for stats.AvgRtt.Milliseconds() >= conf.ThrottlePingThreshold {
|
||||
stats, err = doPing(conf.Host, conf.ConformationPPP, time.Second)
|
||||
|
Reference in New Issue
Block a user