From 2eedef51a241cf6f49bb35fb179eb1a1ceeaf09e Mon Sep 17 00:00:00 2001 From: Artem Lytkin <146867384+4RH1T3CT0R7@users.noreply.github.com> Date: Thu, 8 Oct 2026 08:08:43 +0300 Subject: [PATCH] DNS: Fix pubsub cleanup sizing every topic's slice by the topic count (#7091) https://github.com/XTLS/Xray-core/pull/7091#pullrequestreview-5414371870 --- common/signal/pubsub/pubsub.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/signal/pubsub/pubsub.go b/common/signal/pubsub/pubsub.go index cc9b87eb1..0d3d17485 100644 --- a/common/signal/pubsub/pubsub.go +++ b/common/signal/pubsub/pubsub.go @@ -62,7 +62,7 @@ func (s *Service) Cleanup() error { } for name, subs := range s.subs { - newSub := make([]*Subscriber, 0, len(s.subs)) + newSub := make([]*Subscriber, 0, len(subs)) for _, sub := range subs { if !sub.IsClosed() { newSub = append(newSub, sub)