Skip to content

Commit

Permalink
use limited cli for putFile
Browse files Browse the repository at this point in the history
close #23
  • Loading branch information
zyxkad committed Feb 22, 2024
1 parent bd64311 commit b26f666
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions storage_webdav.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,6 @@ func (s *WebDavStorage) putFile(path string, r io.ReadSeeker) error {
}
logDebugf("Putting %q", target)

s.limitedDialer.Acquire()
defer s.limitedDialer.Release()

cr := &countReader{r, 0}
req, err := http.NewRequestWithContext(context.TODO(), http.MethodPut, target, cr)
if err != nil {
Expand All @@ -231,7 +228,7 @@ func (s *WebDavStorage) putFile(path string, r io.ReadSeeker) error {
req.SetBasicAuth(s.opt.GetUsername(), s.opt.GetPassword())
req.ContentLength = size

res, err := http.DefaultClient.Do(req)
res, err := s.httpCli.Do(req)
if err != nil {
return err
}
Expand Down

0 comments on commit b26f666

Please sign in to comment.