From f866a33a5e0cafd074023ef07a88dfc2230a6862 Mon Sep 17 00:00:00 2001 From: Garet Halliday <me@garet.holiday> Date: Tue, 21 May 2024 17:42:34 -0500 Subject: [PATCH] oh --- lib/gat/handlers/pool/poolers/lifo/pooler.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/gat/handlers/pool/poolers/lifo/pooler.go b/lib/gat/handlers/pool/poolers/lifo/pooler.go index 2c801f9d..6b3018c1 100644 --- a/lib/gat/handlers/pool/poolers/lifo/pooler.go +++ b/lib/gat/handlers/pool/poolers/lifo/pooler.go @@ -44,7 +44,7 @@ func (T *Pooler) AddServer(server uuid.UUID) { } T.servers[server] = struct{}{} - T.Release(server) + T.release(server) } func (T *Pooler) DeleteServer(server uuid.UUID) { @@ -116,9 +116,10 @@ func (T *Pooler) Acquire(_ uuid.UUID, timeout time.Duration) uuid.UUID { cc, _ := T.waiters.PopFront() if c == cc { found = true - break + // we still have to go around the whole thing to maintain order + } else { + T.waiters.PushBack(cc) } - T.waiters.PushBack(cc) } if found { -- GitLab