[go: up one dir, main page]

Session timeout: avoid closure of session in case of time reference going backward

When the time reference clock is detected going backward in the session timeout algorithm (current time < latest message time), the session was closed without any log trace. This behavior is not expected since the clock is expected to be MONOTONIC but it might not be the case on some embedded system.

Note: if the clock is really not monotonic on the system, it shall be guaranteed that no system clock jumps occur to avoid spurious OPC UA timeouts triggered.

Code version and environment identification

6d037cc9

Current behavior

The session timeout is triggered if the clock time reference goes backward since latest message received.

New behavior

The session timeout is reset if the clock time reference goes backward since latest message received. It will be re-evaluated for a new session timeout duration to avoid closing a session when a clock jump is detected (only detected for backward).

Security impact

No impact

Note: the clock should be monotonic on the system to guarantee timeout evaluation are correct even in case of system clock jumps.

Implementation

Reset the latest message received to current time when backward jump detected and display a warning in log.