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:
1 parent
37184948d4
commit
2eedef51a2
1 file changed
+1
-1
@@ -62,7 +62,7 @@ func (s *Service) Cleanup() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for name, subs := range s.subs {
|
for name, subs := range s.subs {
|
||||||
newSub := make([]*Subscriber, 0, len(s.subs))
|
newSub := make([]*Subscriber, 0, len(subs))
|
||||||
for _, sub := range subs {
|
for _, sub := range subs {
|
||||||
if !sub.IsClosed() {
|
if !sub.IsClosed() {
|
||||||
newSub = append(newSub, sub)
|
newSub = append(newSub, sub)
|
||||||
|
|||||||
Reference in new issue
Block a user