rclone: close connection to rclone if open fails
This commit is contained in:
parent
9333f707fa
commit
60a5c35de9
1 changed files with 1 additions and 0 deletions
|
@ -267,6 +267,7 @@ func Open(cfg Config, lim limiter.Limiter) (*Backend, error) {
|
||||||
|
|
||||||
restBackend, err := rest.Open(restConfig, debug.RoundTripper(be.tr))
|
restBackend, err := rest.Open(restConfig, debug.RoundTripper(be.tr))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
_ = be.Close()
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue