mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-04 01:07:49 +02:00
cmd/ctrld: ensure runDNSServer returns when error happens
This commit is contained in:
committed by
Cuong Manh Le
parent
43fecdf60f
commit
a7ea20b117
@@ -434,6 +434,7 @@ func runDNSServer(addr, network string, handler dns.Handler) (*dns.Server, <-cha
|
|||||||
go func() {
|
go func() {
|
||||||
defer close(errCh)
|
defer close(errCh)
|
||||||
if err := s.ListenAndServe(); err != nil {
|
if err := s.ListenAndServe(); err != nil {
|
||||||
|
waitLock.Unlock()
|
||||||
mainLog.Error().Err(err).Msgf("could not listen and serve on: %s", s.Addr)
|
mainLog.Error().Err(err).Msgf("could not listen and serve on: %s", s.Addr)
|
||||||
errCh <- err
|
errCh <- err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user