As suggested by David Woodhouse (https://gitlab.com/openconnect/openconnect/merge_requests/35#note_163190180)
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
int openconnect_make_cstp_connection(struct openconnect_info *vpninfo)
{
- return vpninfo->proto->tcp_connect(vpninfo);
+ int result = vpninfo->proto->tcp_connect(vpninfo);
+
+ /* ssl_times.last_tx should be set to show that a connection has been setup */
+ if (result == 0 && vpninfo->ssl_times.last_tx == 0)
+ vpninfo->ssl_times.last_tx = time(NULL);
+ return result;
}
int openconnect_set_reported_os(struct openconnect_info *vpninfo,