Commit bb833467 authored by Helmut Jacob's avatar Helmut Jacob Committed by oroulet

treat TimeoutHint=0 as mandated by OPC Unified Architecture Specification

According to OPC Unified Architecture Specification (Part 4: Services,
7.28 RequestHeader) a TimeoutHint value of 0 shall be treated as no timeout:
"The value of 0 indicates no timeout.".

This fixes issues with OPC UA clients never receiving any PublishResponse
if a TimeoutHint of 0 was used in the according PublishRequest.
parent 10a9064b
...@@ -65,7 +65,7 @@ class UaProcessor(object): ...@@ -65,7 +65,7 @@ class UaProcessor(object):
len(self._publish_result_queue)) len(self._publish_result_queue))
return return
requestdata = self._publishdata_queue.pop(0) requestdata = self._publishdata_queue.pop(0)
if time.time() - requestdata.timestamp < requestdata.requesthdr.TimeoutHint / 1000: if requestdata.requesthdr.TimeoutHint == 0 or requestdata.requesthdr.TimeoutHint != 0 and time.time() - requestdata.timestamp < requestdata.requesthdr.TimeoutHint / 1000:
break break
response = ua.PublishResponse() response = ua.PublishResponse()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment