From 8a65086cefcb3daa0c8ca9de566ba74f9b1bcf8e Mon Sep 17 00:00:00 2001 From: Mart Aarma Date: Wed, 10 Nov 2021 12:01:40 +0200 Subject: [PATCH] feat: switch to async backchannel logout --- consent/strategy_default.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/consent/strategy_default.go b/consent/strategy_default.go index 6f67951fc05..fc967ae0bd3 100644 --- a/consent/strategy_default.go +++ b/consent/strategy_default.go @@ -26,7 +26,6 @@ import ( "net/url" "strconv" "strings" - "sync" "time" "github.com/ory/hydra/driver/config" @@ -696,13 +695,9 @@ func (s *DefaultStrategy) executeBackChannelLogout(ctx context.Context, r *http. tasks = append(tasks, task{url: c.BackChannelLogoutURI, clientID: c.OutfacingID, token: t}) } - var wg sync.WaitGroup hc := httpx.NewResilientClient() - wg.Add(len(tasks)) var execute = func(t task) { - defer wg.Done() - res, err := hc.PostForm(t.url, url.Values{"logout_token": {t.token}}) if err != nil { s.r.Logger().WithRequest(r).WithError(err). @@ -727,8 +722,6 @@ func (s *DefaultStrategy) executeBackChannelLogout(ctx context.Context, r *http. go execute(t) } - wg.Wait() - return nil }