Browse Source

fix: 修复TenantActor

lijian 2 years ago
parent
commit
ceb2d060b9
2 changed files with 2 additions and 2 deletions
  1. 1 0
      pkg/actors/tenant_actor.go
  2. 1 2
      tests/device/device.go

+ 1 - 0
pkg/actors/tenant_actor.go

@@ -193,5 +193,6 @@ func (t *TenantActorCreator) CreateActor() ruleEngine.Actor {
 	ins := new(TenantActor)
 	ins.tenantId = t.tenantId
 	ins.SystemCtx = t.SystemCtx
+	ins.ruleChainService = t.SystemCtx.RuleChainService
 	return ins
 }

+ 1 - 2
tests/device/device.go

@@ -413,9 +413,8 @@ func (d *Device) doMQTTAccess() error {
 	if err != nil {
 		panic(err)
 	}
-
-	opts.SetDefaultPublishHandler(d.messageHandler)
 	opts.SetTLSConfig(&tls.Config{Certificates: []tls.Certificate{cert}, InsecureSkipVerify: true})
+	opts.SetDefaultPublishHandler(d.messageHandler)
 
 	//create and start a client using the above ClientOptions
 	c := MQTT.NewClient(opts)