From 44f23a67bbc00c7325ba02cfe27392db78c251bc Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Sat, 30 Nov 2019 17:53:25 -0700 Subject: http: Don't listen 1 port beyond port range --- modules/caddyhttp/caddyhttp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/caddyhttp/caddyhttp.go') diff --git a/modules/caddyhttp/caddyhttp.go b/modules/caddyhttp/caddyhttp.go index 7830828..064a963 100644 --- a/modules/caddyhttp/caddyhttp.go +++ b/modules/caddyhttp/caddyhttp.go @@ -187,7 +187,7 @@ func (app *App) Start() error { if err != nil { return fmt.Errorf("%s: parsing listen address '%s': %v", srvName, lnAddr, err) } - for i := uint(0); i <= listenAddr.PortRangeSize(); i++ { + for i := uint(0); i < listenAddr.PortRangeSize(); i++ { hostport := listenAddr.JoinHostPort(i) ln, err := caddy.Listen(listenAddr.Network, hostport) if err != nil { -- cgit v1.2.3