mirror of
https://github.com/caddyserver/caddy.git
synced 2025-05-30 15:58:10 +08:00
Fix error handling with Validate when loading modules (fixes #2658)
The return statement was improperly nested in context.go
This commit is contained in:
@ -102,7 +102,7 @@ func (app *App) Validate() error {
|
||||
}
|
||||
for _, a := range expanded {
|
||||
if sn, ok := lnAddrs[netw+a]; ok {
|
||||
return fmt.Errorf("listener address repeated: %s (already claimed by server '%s')", a, sn)
|
||||
return fmt.Errorf("server %s: listener address repeated: %s (already claimed by server '%s')", srvName, a, sn)
|
||||
}
|
||||
lnAddrs[netw+a] = srvName
|
||||
}
|
||||
@ -486,5 +486,9 @@ const (
|
||||
DefaultHTTPSPort = 443
|
||||
)
|
||||
|
||||
// Interface guard
|
||||
var _ caddy.App = (*App)(nil)
|
||||
// Interface guards
|
||||
var (
|
||||
_ caddy.App = (*App)(nil)
|
||||
_ caddy.Provisioner = (*App)(nil)
|
||||
_ caddy.Validator = (*App)(nil)
|
||||
)
|
||||
|
Reference in New Issue
Block a user