From 568d260371fd14454e5a3e41133e65bc7099a1b9 Mon Sep 17 00:00:00 2001 From: Anssi Mannila Date: Wed, 6 Oct 2021 14:21:48 +0300 Subject: [PATCH] Fix for xApp transction release place - xApp trasaction release is now done before REST notification is sent to xApp - This makes subscription deletion possible instantly after notification Change-Id: Ia076180aaff40a0b8f8f3c655895a5e37364c5bd Signed-off-by: Anssi Mannila --- pkg/control/control.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/control/control.go b/pkg/control/control.go index f67f4e2..5dedb1e 100755 --- a/pkg/control/control.go +++ b/pkg/control/control.go @@ -452,7 +452,8 @@ func (c *Control) processSubscriptionRequests(restSubscription *RESTSubscription subRespMsg, err := c.handleSubscriptionRequest(trans, &subReqMsg, meid, *restSubId) - xapp.Logger.Info("Handled SubscriptionRequest index=%v, %s", index, idstring(nil, trans)) + xapp.Logger.Debug("Handled SubscriptionRequest index=%v, %s", index, idstring(nil, trans)) + trans.Release() if err != nil { c.sendUnsuccesfullResponseNotification(restSubId, restSubscription, xAppEventInstanceID, err, clientEndpoint, trans) @@ -463,7 +464,6 @@ func (c *Control) processSubscriptionRequests(restSubscription *RESTSubscription index, *restSubId, clientEndpoint.Host, *clientEndpoint.HTTPPort, xAppEventInstanceID, e2EventInstanceID, idstring(nil, trans)) c.sendSuccesfullResponseNotification(restSubId, restSubscription, xAppEventInstanceID, e2EventInstanceID, clientEndpoint, trans) } - trans.Release() } } -- 2.16.6