dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit 0046c99ff578314f4d763325b6276ec0e9e0f168
parent 07d3bfaafa0178a5373f00c6df974682671f178d
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Tue, 31 Jan 2023 02:24:25 -0800

cleanup

Diffstat:
Mcmd/dkfupload/main.go | 8+++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/cmd/dkfupload/main.go b/cmd/dkfupload/main.go @@ -229,18 +229,16 @@ func work(i int, wg *sync.WaitGroup, chunksCh chan int64, isLocal, dry bool, max } func doGetClient(isLocal bool, httpTimeout time.Duration) (client *http.Client) { - hasToSucceed(func() error { + hasToSucceed(func() (err error) { if isLocal { client = http.DefaultClient } else { token := GenerateTokenN(8) - var err error - client, err = GetHttpClient(&proxy.Auth{User: token, Password: token}) - if err != nil { + if client, err = GetHttpClient(&proxy.Auth{User: token, Password: token}); err != nil { return err } } - return nil + return }) client.Timeout = httpTimeout return