- xapp.Logger.Info("SubDelResp: SubId: %v, from address: %v:%v. Forwarding response to xApp", int(payloadSeqNum), transaction.Xappkey.Addr, transaction.Xappkey.Port)
-
- params.SubId = int(payloadSeqNum)
- params.Xid = transaction.OrigParams.Xid
- xapp.Logger.Info("Forwarding SubDelResp to xApp: Mtype: %v, SubId: %v, Xid: %v, Meid: %v", params.Mtype, params.SubId, params.Xid, params.Meid)
- err = c.rmrReplyToSender(params)
- if err != nil {
- xapp.Logger.Error("SubDelResp: Failed to send response to xApp. Err: %v, SubId: %v, Xid: %s", err, params.SubId, params.Xid)
- // return
- }
-
- time.Sleep(3 * time.Second)
-
- xapp.Logger.Info("SubDelResp: Starting routing manager update. SubId: %v, Xid: %s", params.SubId, params.Xid)
- subRouteAction := SubRouteInfo{DELETE, transaction.Xappkey.Addr, transaction.Xappkey.Port, payloadSeqNum}
- err = c.rtmgrClient.SubscriptionRequestUpdate(subRouteAction)
- if err != nil {
- xapp.Logger.Error("SubDelResp: Failed to update routing manager. Err: %v, SubId: %v, Xid: %s", err, params.SubId, params.Xid)
+ trans := subs.GetTransaction()
+ if trans == nil {
+ err = fmt.Errorf("Ongoing transaction not found")
+ xapp.Logger.Error("MSG-SubFail: %s", idstring(params, subs, err))