app/proxyman/inbound/inbound.go: Fix ListHandlers() (#4976)

Fixes https://github.com/XTLS/Xray-core/issues/4956
This commit is contained in:
风扇滑翔翼
2025-08-03 19:02:08 +08:00
committed by GitHub
parent 7cbf5b004c
commit 00f3147242
2 changed files with 8 additions and 8 deletions

View File

@@ -150,8 +150,8 @@ func (m *Manager) ListHandlers(ctx context.Context) []outbound.Handler {
m.access.RLock()
defer m.access.RUnlock()
var response []outbound.Handler
copy(m.untaggedHandlers, response)
response := make([]outbound.Handler, len(m.untaggedHandlers))
copy(response, m.untaggedHandlers)
for _, v := range m.taggedHandler {
response = append(response, v)