default value for strategy random

pull/73/head
v2ray 2016-01-23 10:58:26 +01:00
parent c26f081101
commit c958a20565
1 changed files with 8 additions and 0 deletions

View File

@ -128,6 +128,14 @@ func (this *InboundDetourConfig) UnmarshalJSON(data []byte) error {
Refresh: DefaultRefreshMinute,
}
}
if this.Allocation.Strategy == AllocationStrategyRandom {
if this.Allocation.Refresh == 0 {
this.Allocation.Refresh = 5
}
if this.Allocation.Concurrency == 0 {
this.Allocation.Concurrency == 3
}
}
return nil
}