Move CreateTconts grpc call to callInThread
Change-Id: I0765cbcddbf15b26ea34a014412721364492a009
diff --git a/voltha/adapters/openolt/openolt_flow_mgr.py b/voltha/adapters/openolt/openolt_flow_mgr.py
index 11f9150..dd043ab 100644
--- a/voltha/adapters/openolt/openolt_flow_mgr.py
+++ b/voltha/adapters/openolt/openolt_flow_mgr.py
@@ -473,12 +473,6 @@
tconts = self.tech_profile[intf_id].get_tconts(
tech_profile_instance, us_scheduler, ds_scheduler)
- self.stub.CreateTconts(openolt_pb2.Tconts(intf_id=intf_id,
- onu_id=onu_id,
- uni_id=uni_id,
- port_no=ofp_port_no,
- tconts=tconts))
-
# Fetch alloc id and gemports from tech profile instance
alloc_id = tech_profile_instance.us_scheduler.alloc_id
gem_port_ids = []
@@ -487,6 +481,13 @@
gem_port_ids.append(
tech_profile_instance.upstream_gem_port_attribute_list[i].
gemport_id)
+
+ reactor.callInThread(self.stub.CreateTconts,
+ openolt_pb2.Tconts(intf_id=intf_id,
+ onu_id=onu_id,
+ uni_id=uni_id,
+ port_no=ofp_port_no,
+ tconts=tconts))
except Exception as e:
self.log.exception(exception=e)