Skip to content

Commit af474fc

Browse files
authored
Fix issue #22: Corrected calling order of lws_service and CFE_SB_RcvMsg
This commit fixes issue #22 by reversing the calling order of the `lws_service` and `CFE_SB_RcvMsg` functions. Verified by manually checking out the branch `pr-23-fix-issue22`, building and running the test case in the local environment. The change resolves the observed message handling behavior described in the issue. Reviewed and tested by @yuyuqq.
2 parents 46eeff5 + 38a9022 commit af474fc

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

cFS/Bridge/Client_C/apps/racs2_bridge_client/fsw/src/racs2_bridge_client.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,6 @@ void RACS2_BRIDGE_CLIENT_Main( void )
214214
g_old = tv.tv_sec;
215215
}
216216

217-
lws_service( g_context, (0) );
218-
// === EEE: For WebSocket =====================
219-
220217
/* Pend on receipt of command packet -- timeout set to 500 millisecs */
221218
status = CFE_SB_RcvMsg(&RACS2_UserMsgPkt_Ptr, RACS2_BRIDGE_CLIENT_CommandPipe, 1000);
222219

@@ -231,6 +228,8 @@ void RACS2_BRIDGE_CLIENT_Main( void )
231228
OS_printf("RACS2_BRIDGE_CLIENT: CFE_SB_RcvMsg failed, status = 0x%x\n", status);
232229
}
233230

231+
lws_service( g_context, (0) );
232+
// === EEE: For WebSocket =====================
234233
}
235234

236235
CFE_ES_ExitApp(RunStatus);

0 commit comments

Comments
 (0)