Skip to content

Commit

Permalink
Merge pull request #413 from shilpa24balaji/xmidt_send_loop
Browse files Browse the repository at this point in the history
Xmidt send loop
  • Loading branch information
sadhyama committed Apr 11, 2023
2 parents 502f564 + f7c9f48 commit 118e8ee
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/xmidtsend_rbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "config.h"
#include "time.h"
#include "heartBeat.h"
#include "close_retry.h"

static pthread_t processThreadId = 0;
static unsigned int XmidtQsize = 0;
Expand Down Expand Up @@ -138,9 +139,9 @@ void decrement_XmidtQsize()
int checkCloudConn()
{
int ret = 1;
if (!cloud_status_is_online ())
if (get_close_retry() || !cloud_status_is_online ())
{
ParodusInfo("cloud status is not online, wait till connection up\n");
ParodusInfo("close_retry is in progress or cloud status is not online, wait till connection up\n");

int rv;
struct timespec ts;
Expand Down Expand Up @@ -771,16 +772,15 @@ int sendXmidtEventToServer(XmidtMsg *msgnode, wrp_msg_t * msg, rbusMethodAsyncHa
ParodusError("sendXmidtEventToServer is Failed\n");
if((highQosValueCheck(qos)) || (higherPriorityLowQosCheck(qos)))
{
ParodusPrint("The event is having high qos retry again\n");
ParodusInfo("Wait till connection is Up\n");
ParodusPrint("The event is having high qos retry again, wait till connection is Up\n");
rv = checkCloudConn();
if(rv == 2)
{
printSendMsgData("queue optimized during send. retry", notif_wrp_msg->u.event.qos, notif_wrp_msg->u.event.dest, notif_wrp_msg->u.event.transaction_uuid);
break;
}
ParodusInfo("Received cloud status signal proceed to retry\n");
printSendMsgData("send to server after cloud reconnect", notif_wrp_msg->u.event.qos, notif_wrp_msg->u.event.dest, notif_wrp_msg->u.event.transaction_uuid);
printSendMsgData("send to server after cloud reconnect", notif_wrp_msg->u.event.qos, notif_wrp_msg->u.event.dest, notif_wrp_msg->u.event.transaction_uuid);
}
else
{
Expand Down

0 comments on commit 118e8ee

Please sign in to comment.