diff --git a/main.go b/main.go index 3f61ab0..4f05cdf 100644 --- a/main.go +++ b/main.go @@ -62,7 +62,7 @@ func main() { var instance interface{} go func() { - if ooccp.ProbeStateTypeNotAuthorized == config.Config.Probe.State() { + if ooccp.ProbeStateTypeNotAuthorized != config.Config.Probe.State() { var err error instance = auth.New() diff --git a/probe/probe.go b/probe/probe.go index b950275..4578d9c 100644 --- a/probe/probe.go +++ b/probe/probe.go @@ -60,6 +60,8 @@ func (pm *probeManagers) Start() error { probeRPCRegistry.RegisterService(probeService, "") probeRPCRegistry.RegisterService(sensorService, "") + logging.Logger().Debug(fmt.Sprintf("%v", centralService.CentralClients)) + if err := centralProbeClient.Connect(); nil != err { return err } diff --git a/service/CentralService.go b/service/CentralService.go index c80aef5..38bc8cd 100644 --- a/service/CentralService.go +++ b/service/CentralService.go @@ -13,7 +13,7 @@ func init() { } type CentralService struct { - CentralClients map[string]oogwc.Client + CentralClients map[string]oogwc.Client `annotation:"@Resource()"` } func (cs *CentralService) PutClient(entryPath string, c oogwc.Client) {