DNS: Fix pubsub cleanup sizing every topic's slice by the topic count (#7091)

https://github.com/XTLS/Xray-core/pull/7091#pullrequestreview-5414371870
This commit is contained in:
Artem Lytkin
2026-10-08 05:08:43 +00:00
committed by GitHub
parent 37184948d4
commit 2eedef51a2
+1 -1
View File
@@ -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)