Skip to content

Commit

Permalink
Return received error code on ACK message
Browse files Browse the repository at this point in the history
  • Loading branch information
Pro committed Jul 13, 2018
1 parent 941f123 commit 9fb4313
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client/ua_client_connect.c
Expand Up @@ -66,7 +66,7 @@ processACKResponse(void *application, UA_Connection *connection, UA_ByteString *
UA_Byte *data = (UA_Byte*)&chunk->data[offset + 4+4];
UA_LOG_ERROR(client->config.logger, UA_LOGCATEGORY_NETWORK,
"Received ERR response. %s - %.*s", UA_StatusCode_name(error), len, data);
return UA_STATUSCODE_BADTCPMESSAGETYPEINVALID;
return error;
}
if (chunkType != UA_CHUNKTYPE_FINAL) {
return UA_STATUSCODE_BADTCPMESSAGETYPEINVALID;
Expand Down Expand Up @@ -145,7 +145,7 @@ HelAckHandshake(UA_Client *client) {
client->config.timeout);
if(retval != UA_STATUSCODE_GOOD) {
UA_LOG_INFO(client->config.logger, UA_LOGCATEGORY_NETWORK,
"Receiving ACK message failed");
"Receiving ACK message failed with %s", UA_StatusCode_name(retval));
if(retval == UA_STATUSCODE_BADCONNECTIONCLOSED)
client->state = UA_CLIENTSTATE_DISCONNECTED;
UA_Client_close(client);
Expand Down

0 comments on commit 9fb4313

Please sign in to comment.