diff options
author | Matthew Holt <[email protected]> | 2019-11-30 17:53:25 -0700 |
---|---|---|
committer | Matthew Holt <[email protected]> | 2019-11-30 17:53:25 -0700 |
commit | 44f23a67bbc00c7325ba02cfe27392db78c251bc (patch) | |
tree | 5c6838cf6bb9ace5222582dbb8e13fa202cab82f | |
parent | 7c7ef8d40e3af35444d522debc95451c04666615 (diff) | |
download | caddy-44f23a67bbc00c7325ba02cfe27392db78c251bc.tar.gz caddy-44f23a67bbc00c7325ba02cfe27392db78c251bc.zip |
http: Don't listen 1 port beyond port range
-rw-r--r-- | modules/caddyhttp/caddyhttp.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/caddyhttp/caddyhttp.go b/modules/caddyhttp/caddyhttp.go index 783082801..064a963a0 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 { |