simplify port range

This commit is contained in:
v2ray committed 2016-01-15 13:39:36 +01:00
1 parent 5ceac7a6e2
commit 393a64820f
10 files changed
+38 -81

No files matched your search

+2 -2
View File
@@ -23,8 +23,8 @@ type InboundDetourHandler struct {
func (this *InboundDetourHandler) Initialize() error {
ports := this.config.PortRange()
this.ich = make([]*InboundConnectionHandlerWithPort, 0, ports.To()-ports.From()+1)
for i := ports.From(); i <= ports.To(); i++ {
this.ich = make([]*InboundConnectionHandlerWithPort, 0, ports.To-ports.From+1)
for i := ports.From; i <= ports.To; i++ {
ichConfig := this.config.Settings()
ich, err := proxyrepo.CreateInboundConnectionHandler(this.config.Protocol(), this.space, ichConfig)
if err != nil {