- if err := handler.ranReconnectionManager.ReconnectRan(nbIdentity.InventoryName); err != nil {
- logger.Errorf("#E2TermInitNotificationHandler.Handle - Ran name: %s - connection attempt failure, error: %s", (*nbIdentity).GetInventoryName(), err.Error())
+ if e2tInstance.State == entities.RoutingManagerFailure {
+ err := h.e2tInstancesManager.ActivateE2TInstance(e2tInstance)
+ if err != nil {
+ return
+ }
+ }
+
+ h.HandleExistingE2TInstance(e2tInstance)
+
+ h.logger.Infof("#E2TermInitNotificationHandler.Handle - Completed handling of E2_TERM_INIT")
+}
+
+func (h E2TermInitNotificationHandler) HandleExistingE2TInstance(e2tInstance *entities.E2TInstance) {
+
+ for _, ranName := range e2tInstance.AssociatedRanList {
+
+ if err := h.ranReconnectionManager.ReconnectRan(ranName); err != nil {
+ h.logger.Errorf("#E2TermInitNotificationHandler.HandleExistingE2TInstance - Ran name: %s - connection attempt failure, error: %s", ranName, err)