Check timestamp_diff return code correctly

This commit is contained in:
William Robinet 2021-01-27 18:31:28 +01:00
parent 2a7b0f664f
commit f24eafd8b4

View file

@ -170,7 +170,8 @@ int clean_old_conn() {
while(conn) {
tcpconn = &conn->conn;
conn=conn->next;
timestamp_diff(&last_packet_seen_time, &tcpconn->last_seen_time, &dt);
if(timestamp_diff(&last_packet_seen_time, &tcpconn->last_seen_time, &dt))
continue;
if(dt.tv_sec > conn_ttl) {
i++;
tcp_destroy_conn(tcpconn);