diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2019-11-30 17:53:25 -0700 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2019-11-30 17:53:25 -0700 |
commit | 44f23a67bbc00c7325ba02cfe27392db78c251bc (patch) | |
tree | 5c6838cf6bb9ace5222582dbb8e13fa202cab82f /modules/caddyhttp | |
parent | 7c7ef8d40e3af35444d522debc95451c04666615 (diff) |
http: Don't listen 1 port beyond port range
Diffstat (limited to 'modules/caddyhttp')
-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 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 { |