From 336975a51422ea39f4d1c7562f1ba9aaa51f9894 Mon Sep 17 00:00:00 2001 From: im-adithya Date: Wed, 3 Jul 2024 11:22:05 +0530 Subject: [PATCH] chore: start go routine after saving cookie --- http/http_service.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/http/http_service.go b/http/http_service.go index 5e3b4ba9..4542a982 100644 --- a/http/http_service.go +++ b/http/http_service.go @@ -186,13 +186,6 @@ func (httpSvc *HttpService) startHandler(c echo.Context) error { }) } - go func() { - err := httpSvc.api.Start(&startRequest) - if err != nil { - logger.Logger.WithError(err).Error("Failed to start node") - } - }() - err := httpSvc.saveSessionCookie(c) if err != nil { @@ -201,6 +194,13 @@ func (httpSvc *HttpService) startHandler(c echo.Context) error { }) } + go func() { + err := httpSvc.api.Start(&startRequest) + if err != nil { + logger.Logger.WithError(err).Error("Failed to start node") + } + }() + return c.NoContent(http.StatusNoContent) }