mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
internal/clientinfo: allow router discovers initialization to be failed
Currently, the router discovers initialization are done during startup. If it were failed, the discovers are skipped. This is too strict, since the initialization could be failed due to some requires services are not ready when ctrld started, or router specific requirements for services management during startup (like UnifiOS v4.0.20). To fix this, ctrld should relax the initialization checking, allow it to be failed, and still use the discovers later.
This commit is contained in:
committed by
Cuong Manh Le
parent
c329402f5d
commit
043a28eb33
@@ -207,11 +207,10 @@ func (t *Table) init() {
|
||||
}
|
||||
for platform, discover := range discovers {
|
||||
if err := discover.refresh(); err != nil {
|
||||
ctrld.ProxyLogger.Load().Error().Err(err).Msgf("could not init %s discover", platform)
|
||||
} else {
|
||||
t.hostnameResolvers = append(t.hostnameResolvers, discover)
|
||||
t.refreshers = append(t.refreshers, discover)
|
||||
ctrld.ProxyLogger.Load().Warn().Err(err).Msgf("failed to init %s discover", platform)
|
||||
}
|
||||
t.hostnameResolvers = append(t.hostnameResolvers, discover)
|
||||
t.refreshers = append(t.refreshers, discover)
|
||||
}
|
||||
}
|
||||
// Hosts file mapping.
|
||||
|
||||
Reference in New Issue
Block a user