Просмотр исходного кода

acme/api: Add missing return

Stop execution when the error happens. This was previously a typo.
David Cowden 6 лет назад
Родитель
Сommit
2d0a00c4e1
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      acme/api/handler.go

+ 1 - 0
acme/api/handler.go

@@ -212,6 +212,7 @@ func (h *Handler) GetChallenge(w http.ResponseWriter, r *http.Request) {
 	ch, err = h.Auth.ValidateChallenge(prov, acc.GetID(), chID, acc.GetKey())
 	ch, err = h.Auth.ValidateChallenge(prov, acc.GetID(), chID, acc.GetKey())
 	if err != nil {
 	if err != nil {
 		api.WriteError(w, err)
 		api.WriteError(w, err)
+		return
 	}
 	}
 
 
 	switch ch.Status {
 	switch ch.Status {