mirror of
https://github.com/coredns/coredns.git
synced 2025-11-02 02:03:13 -05:00
Fix start mesg for all protocol (#1617)
Recent bind refactoring missed this:
grpc://example.com.:1055
example.com.:1053 on 127.0.0.1
now becomes
grpc://example.com.:1055 on 127.0.0.1
example.com.:1053 on 127.0.0.1
If you're using *bind* directive.
This commit is contained in:
@@ -294,23 +294,11 @@ func (s *Server) OnStartupComplete() {
|
||||
return
|
||||
}
|
||||
|
||||
for zone := range s.zones {
|
||||
// split addr into protocol, IP and Port
|
||||
_, ip, port, err := SplitProtocolHostPort(s.Addr)
|
||||
|
||||
if err != nil {
|
||||
// this should not happen, but we need to take care of it anyway
|
||||
fmt.Println(zone + ":" + s.Addr)
|
||||
continue
|
||||
}
|
||||
if ip == "" {
|
||||
fmt.Println(zone + ":" + port)
|
||||
continue
|
||||
}
|
||||
// if the server is listening on a specific address let's make it visible in the log,
|
||||
// so one can differentiate between all active listeners
|
||||
fmt.Println(zone + ":" + port + " on " + ip)
|
||||
out := startUpZones("", s.Addr, s.zones)
|
||||
if out != "" {
|
||||
fmt.Print(out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// Tracer returns the tracer in the server if defined.
|
||||
|
||||
Reference in New Issue
Block a user