Merge pull request #6517 from hashicorp/b-fingerprint-shutdown-race

client: don't retry fingerprinting on shutdown
This commit is contained in:
Mahmood Ali 2020-07-24 11:56:32 -04:00 committed by GitHub
commit 2d0b80a0ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -313,6 +313,12 @@ func (i *instanceManager) fingerprint() {
continue
}
// avoid fingerprinting again if ctx and fpChan both close
if i.ctx.Err() != nil {
cancel()
return
}
// if the channel is closed attempt to open a new one
newFpChan, newCancel, err := i.dispenseFingerprintCh()
if err != nil {