Browse Source

EdgeGrpcSession - Set tenant id on connect

pull/9175/head
Volodymyr Babak 3 years ago
parent
commit
f31da3c605
  1. 1
      application/src/main/java/org/thingsboard/server/service/edge/rpc/EdgeGrpcSession.java

1
application/src/main/java/org/thingsboard/server/service/edge/rpc/EdgeGrpcSession.java

@ -762,6 +762,7 @@ public final class EdgeGrpcSession implements Closeable {
Optional<Edge> optional = ctx.getEdgeService().findEdgeByRoutingKey(TenantId.SYS_TENANT_ID, request.getEdgeRoutingKey());
if (optional.isPresent()) {
edge = optional.get();
this.tenantId = edge.getTenantId();
try {
if (edge.getSecret().equals(request.getEdgeSecret())) {
sessionOpenListener.accept(edge.getId(), this);

Loading…
Cancel
Save