Skip to content

Commit f5700bc

Browse files
authored
There are 2 potential blocking calls when using IoTCredentialProvider… (#223)
* There are 2 potential blocking calls when using IoTCredentialProvider: Curl & Lws. The curl call already has logging when the curl_easy_perform fails, however the LWS blocking call did not have any logging on failure. * Corrected the capitalization, added general error message, but also wanted to keep the specific error message for LWS failure
1 parent a8091d1 commit f5700bc

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/source/Common/Lws/LwsCall.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ STATUS blockingLwsCall(PRequestInfo pRequestInfo, PCallInfo pCallInfo)
7373

7474
CleanUp:
7575

76+
if(retStatus == STATUS_IOT_CREATE_LWS_CONTEXT_FAILED)
77+
{
78+
DLOGW("Unable to create LWS context or connect to Websocket server");
79+
}
80+
else
81+
{
82+
CHK_LOG_ERR(retStatus);
83+
}
7684
if (lwsContext != NULL) {
7785
// Trigger termination
7886
ATOMIC_STORE_BOOL(&pCallInfo->pRequestInfo->terminating, TRUE);
@@ -259,4 +267,4 @@ INT32 lwsIotCallbackRoutine(struct lws* wsi, enum lws_callback_reasons reason, P
259267
} else {
260268
return retValue;
261269
}
262-
}
270+
}

0 commit comments

Comments
 (0)