diff --git a/main.go b/main.go index 11058c6..0889703 100644 --- a/main.go +++ b/main.go @@ -147,14 +147,14 @@ func (m UploadManager) pingWorker() error { return err } if m.isBWInRange(up + conf.Bandwidth.Step) { - log.Infof("short ping %s, trying to increase upload TC %d->%d", stats.AvgRtt, up, up+conf.Bandwidth.Step) + log.Infof("short ping %s, trying to increase upload TC %f->%f", stats.AvgRtt, up, up+conf.Bandwidth.Step) up, err = m.SetUpload(up + conf.Bandwidth.Step) if err != nil { return err } m.LastOver = time.Now() - log.Infof("upload TC increased to %d, measuring latency", up) + log.Infof("upload TC increased to %f, measuring latency", up) stats, err = doPing(conf.Host, conf.ConformationPPP, time.Second) if err != nil { log.Warningf("ping to %s failed: %v", conf.Host, err) @@ -163,7 +163,7 @@ func (m UploadManager) pingWorker() error { } if stats.AvgRtt.Milliseconds() >= conf.ThrottlePingThreshold { - log.Infof("increase failed with %s ping, reverting to %d", stats.AvgRtt, up-conf.Bandwidth.Step) + log.Infof("increase failed with %s ping, reverting to %f", stats.AvgRtt, up-conf.Bandwidth.Step) _, err = m.SetUpload(up - conf.Bandwidth.Step) if err != nil { return err