From 76ae76c367eb979390b2dc73a81d863fa7057f4a Mon Sep 17 00:00:00 2001 From: Jean Flach Date: Wed, 20 Mar 2019 11:31:34 +0100 Subject: [PATCH] Fix context startup --- main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 918c0d02..439a8207 100644 --- a/main.go +++ b/main.go @@ -51,9 +51,9 @@ func main() { go icingadb_json_decoder.DecodePool(super.ChDecode, super.ChErr, 16) - chHA := ha.RegisterNotificationListener() + chHAHost := ha.RegisterNotificationListener() go func() { - super.ChErr <- sync.Operator(&super, chHA, &sync.Context{ + super.ChErr <- sync.Operator(&super, chHAHost, &sync.Context{ ObjectType: "host", Factory: host.NewHost, InsertStmt: host.BulkInsertStmt, @@ -62,10 +62,10 @@ func main() { }) }() + chHAService := ha.RegisterNotificationListener() go func() { - chHA := ha.RegisterNotificationListener() - super.ChErr <- sync.Operator(&super, chHA, &sync.Context{ + super.ChErr <- sync.Operator(&super, chHAService, &sync.Context{ ObjectType: "service", Factory: service.NewService, InsertStmt: service.BulkInsertStmt,