From cefc03bcb25a01a40ae45e10834adcf381a1bf53 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Tue, 6 Jun 2023 11:25:02 +0200 Subject: [PATCH] If leave fails, shutdown cluster anyways --- http/handler/api/cluster.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/http/handler/api/cluster.go b/http/handler/api/cluster.go index bdef2c39..4fd2ca3b 100644 --- a/http/handler/api/cluster.go +++ b/http/handler/api/cluster.go @@ -96,11 +96,7 @@ func (h *ClusterHandler) About(c echo.Context) error { // @Security ApiKeyAuth // @Router /api/v3/cluster/leave [put] func (h *ClusterHandler) Leave(c echo.Context) error { - err := h.cluster.Leave("", "") - if err != nil { - return api.Err(http.StatusInternalServerError, "", "Failed to leave cluster gracefully: %s", err) - } - + h.cluster.Leave("", "") h.cluster.Shutdown() return c.JSON(http.StatusOK, "OK")