summaryrefslogtreecommitdiff
path: root/modules/caddyhttp
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-11-30 17:53:25 -0700
committerMatthew Holt <mholt@users.noreply.github.com>2019-11-30 17:53:25 -0700
commit44f23a67bbc00c7325ba02cfe27392db78c251bc (patch)
tree5c6838cf6bb9ace5222582dbb8e13fa202cab82f /modules/caddyhttp
parent7c7ef8d40e3af35444d522debc95451c04666615 (diff)
http: Don't listen 1 port beyond port range
Diffstat (limited to 'modules/caddyhttp')
-rw-r--r--modules/caddyhttp/caddyhttp.go2
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 {