Fix idle check in root mode

This commit is contained in:
emanuele-f 2021-06-29 16:29:10 +02:00
parent 5b50e3e8a1
commit 76daeaa849
2 changed files with 2 additions and 1 deletions

View File

@ -285,6 +285,7 @@ static void purge_expired_connections(vpnproxy_data_t *proxy, pcap_conn_t **conn
log_d("IDLE (type=%d)", conn->tuple.ipproto);
// Will free the data in sendConnectionsDump
conn->data->update_type = CONN_UPDATE_STATS;
notify_connection(&proxy->conns_updates, &conn->tuple, conn->data);
conn->data->status = CONN_STATUS_CLOSED;

View File

@ -899,7 +899,7 @@ void refresh_time(vpnproxy_data_t *proxy) {
struct timeval now_tv;
gettimeofday(&now_tv, NULL);
proxy->now_ms = now_tv.tv_sec * 1000 + now_tv.tv_usec / 1000;
proxy->now_ms = (uint64_t)now_tv.tv_sec * 1000 + now_tv.tv_usec / 1000;
}
/* ******************************************************* */