Parcourir la source

Ignore good timeout of UA_Connection_receiveChunksBlocking in receiveServiceResponse

Christian von Arnim il y a 7 ans
Parent
commit
e5f33bb7b4
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      src/client/ua_client.c

+ 2 - 1
src/client/ua_client.c

@@ -274,7 +274,8 @@ receiveServiceResponse(UA_Client *client, void *response, const UA_DataType *res
         UA_UInt32 timeout = (UA_UInt32)((maxDate - now) / UA_MSEC_TO_DATETIME);
         retval = UA_Connection_receiveChunksBlocking(&client->connection, &rd,
                                                      client_processChunk, timeout);
-        if(retval != UA_STATUSCODE_GOOD) {
+
+        if(retval != UA_STATUSCODE_GOOD && retval != UA_STATUSCODE_GOODNONCRITICALTIMEOUT) {
             if(retval == UA_STATUSCODE_BADCONNECTIONCLOSED)
                 client->state = UA_CLIENTSTATE_DISCONNECTED;
             else