瀏覽代碼

Ignore good timeout of UA_Connection_receiveChunksBlocking in receiveServiceResponse

Christian von Arnim 7 年之前
父節點
當前提交
e5f33bb7b4
共有 1 個文件被更改,包括 2 次插入1 次删除
  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