From 30b111ae0f7297bb23dc8a3cbd7296fde60ab1b1 Mon Sep 17 00:00:00 2001
From: Sarat Chandra <me@saratchandra.in>
Date: Thu, 14 Mar 2024 10:42:36 +0530
Subject: [PATCH] fix: Fix loop variable capture in case of multiple queues.

---
 server.go | 1 +
 1 file changed, 1 insertion(+)

diff --git a/server.go b/server.go
index bc9077f..e1b3f58 100644
--- a/server.go
+++ b/server.go
@@ -221,6 +221,7 @@ func (s *Server) Start(ctx context.Context) {
 
 	var wg sync.WaitGroup
 	for q, conc := range queues {
+		q := q // Hack to fix the loop variable capture issue.
 		if s.traceProv != nil {
 			var span spans.Span
 			ctx, span = otel.Tracer(tracer).Start(ctx, "start")