Browse Source

[GinS] Indexing should be done on commit

cgars 7 years ago
parent
commit
e4f9f75922
1 changed files with 2 additions and 1 deletions
  1. 2 1
      cmd/serv.go

+ 2 - 1
cmd/serv.go

@@ -293,7 +293,8 @@ func startIndexing(user, owner *models.User, repo *models.Repository) {
 		return
 	}
 	req, _ := http2.NewRequest(http2.MethodPost, setting.Search.IndexUrl, bytes.NewReader(data))
-	resp, err := http2.Client{}.Do(req)
+	client := http2.Client{}
+	resp, err := client.Do(req)
 	if err != nil || resp.StatusCode != http2.StatusOK {
 		log.Trace("Error doing index request:%+v,%d", err, resp.StatusCode)
 		return