mirror of https://github.com/restic/restic.git
rclone: close connection to rclone if open fails
This commit is contained in:
parent
9333f707fa
commit
60a5c35de9
|
@ -267,6 +267,7 @@ func Open(cfg Config, lim limiter.Limiter) (*Backend, error) {
|
|||
|
||||
restBackend, err := rest.Open(restConfig, debug.RoundTripper(be.tr))
|
||||
if err != nil {
|
||||
_ = be.Close()
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue