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 {
|
if len(downloadsRunning) == 0 {
|
||||||
// close the sftp connection since it is not being used
|
// close the sftp connection since it is not being used
|
||||||
q.sftpClient.Close()
|
if q.sftpClient != nil {
|
||||||
q.sftpClient = nil
|
q.sftpClient.Close()
|
||||||
|
q.sftpClient = nil
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
cont = true
|
cont = true
|
||||||
for cont {
|
for cont {
|
||||||
|
|
Loading…
Reference in a new issue