mirror of
https://github.com/adulau/ssldump.git
synced 2024-11-24 18:37:05 +00:00
Avoid auto-vivisection during connection clean-up ...
This commit is contained in:
parent
d5dc74824d
commit
d87056ac76
1 changed files with 3 additions and 1 deletions
|
@ -176,8 +176,10 @@ int clean_old_conn() {
|
||||||
if(!last_packet_seen_time.tv_sec)
|
if(!last_packet_seen_time.tv_sec)
|
||||||
return 0; // Still processing first block of packets
|
return 0; // Still processing first block of packets
|
||||||
|
|
||||||
for(conn=first_conn;conn;conn=conn->next) {
|
conn = first_conn;
|
||||||
|
while(conn) {
|
||||||
tcpconn = &conn->conn;
|
tcpconn = &conn->conn;
|
||||||
|
conn=conn->next;
|
||||||
timestamp_diff(&last_packet_seen_time, &tcpconn->last_seen_time, &dt);
|
timestamp_diff(&last_packet_seen_time, &tcpconn->last_seen_time, &dt);
|
||||||
if(dt.tv_sec > conn_ttl) {
|
if(dt.tv_sec > conn_ttl) {
|
||||||
i++;
|
i++;
|
||||||
|
|
Loading…
Reference in a new issue