|
@@ -23,7 +23,7 @@ Connection_receiveChunk(UA_Connection *connection, UA_ByteString * UA_RESTRICT m
|
|
|
UA_DateTime now = UA_DateTime_nowMonotonic();
|
|
|
if(now > maxDate)
|
|
|
return UA_STATUSCODE_GOODNONCRITICALTIMEOUT;
|
|
|
- UA_UInt32 thisTimeout = (UA_UInt32)((maxDate - UA_DateTime_nowMonotonic()) / UA_MSEC_TO_DATETIME);
|
|
|
+ UA_UInt32 thisTimeout = (UA_UInt32)((maxDate - now) / UA_MSEC_TO_DATETIME);
|
|
|
retval = connection->recv(connection, message, thisTimeout);
|
|
|
retval |= UA_Connection_completeMessages(connection, message, realloced);
|
|
|
} while(retval == UA_STATUSCODE_GOOD && message->length == 0);
|