mirror of
https://github.com/octoleo/restic.git
synced 2024-11-23 05:12:10 +00:00
parent
925a3cfad7
commit
e8995b85b8
@ -80,6 +80,10 @@ func (b *restBackend) Save(h restic.Handle, rd io.Reader) (err error) {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// make sure that client.Post() cannot close the reader by wrapping it in
|
||||||
|
// backend.Closer, which has a noop method.
|
||||||
|
rd = backend.Closer{Reader: rd}
|
||||||
|
|
||||||
<-b.connChan
|
<-b.connChan
|
||||||
resp, err := b.client.Post(restPath(b.url, h), "binary/octet-stream", rd)
|
resp, err := b.client.Post(restPath(b.url, h), "binary/octet-stream", rd)
|
||||||
b.connChan <- struct{}{}
|
b.connChan <- struct{}{}
|
||||||
|
Loading…
Reference in New Issue
Block a user