Fix startup issue of closing a nonexistent connection
This commit is contained in:
parent
ba49a850a2
commit
9e49d266cf
1 changed files with 4 additions and 2 deletions
|
@ -399,8 +399,10 @@ func (q *Queue) Run(stop <-chan bool) {
|
|||
|
||||
if len(downloadsRunning) == 0 {
|
||||
// close the sftp connection since it is not being used
|
||||
if q.sftpClient != nil {
|
||||
q.sftpClient.Close()
|
||||
q.sftpClient = nil
|
||||
}
|
||||
} else {
|
||||
cont = true
|
||||
for cont {
|
||||
|
|
Loading…
Reference in a new issue