Delete non-existing documents from the index

This commit is contained in:
Haiyan Meng
2019-12-17 09:32:11 -08:00
parent 1eb713157c
commit 2c2aa928cc
5 changed files with 44 additions and 16 deletions

View File

@@ -580,10 +580,7 @@ func (gcl GhClient) getWithRetry(
retryCount := gcl.retryCount
for err == nil &&
resp.StatusCode == http.StatusForbidden &&
retryCount > 0 {
for resp.StatusCode == http.StatusForbidden && retryCount > 0 {
retryTime := resp.Header.Get("Retry-After")
i, errAtoi := strconv.Atoi(retryTime)
if errAtoi != nil {