查找HTTP3端口时只计算已经启用的

This commit is contained in:
刘祥超
2023-06-01 19:42:40 +08:00
parent 71e03f5e07
commit 1e1e6e7e81

View File

@@ -729,6 +729,9 @@ func (this *NodeConfig) FindHTTP3Ports() (ports []int) {
http3PolicyLocker.RLock()
defer http3PolicyLocker.RUnlock()
for _, policy := range this.HTTP3Policies {
if !policy.IsOn {
continue
}
if policy.Port <= 0 {
policy.Port = DefaultHTTP3Port
}