add debug switch and mute excessive logging

This commit is contained in:
nikk gitanes
2020-11-02 17:36:36 +03:00
parent 06d9a364d1
commit 28c49b297b
4 changed files with 11 additions and 3 deletions

View File

@@ -73,6 +73,7 @@ func (bt *BTServer) configure() {
bt.config = torrent.NewDefaultClientConfig()
bt.config.Debug = settings.Get().EnableDebug
bt.config.DisableIPv6 = settings.Get().EnableIPv6 == false
bt.config.DisableTCP = settings.Get().DisableTCP
bt.config.DisableUTP = settings.Get().DisableUTP
@@ -93,7 +94,6 @@ func (bt *BTServer) configure() {
if settings.Get().DhtConnectionLimit > 0 {
bt.config.ConnTracker.SetMaxEntries(settings.Get().DhtConnectionLimit)
}
if settings.Get().DownloadRateLimit > 0 {
bt.config.DownloadRateLimiter = utils.Limit(settings.Get().DownloadRateLimit * 1024)
}