mirror of https://github.com/caddyserver/caddy.git
http: Don't listen 1 port beyond port range
This commit is contained in:
parent
7c7ef8d40e
commit
44f23a67bb
|
@ -187,7 +187,7 @@ func (app *App) Start() error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("%s: parsing listen address '%s': %v", srvName, lnAddr, err)
|
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)
|
hostport := listenAddr.JoinHostPort(i)
|
||||||
ln, err := caddy.Listen(listenAddr.Network, hostport)
|
ln, err := caddy.Listen(listenAddr.Network, hostport)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue