Skip to content

Commit

Permalink
HevSocks5Tunnel: Move zeroing stats to finalizer.
Browse files Browse the repository at this point in the history
  • Loading branch information
heiher committed Jan 5, 2024
1 parent 42b5bab commit 09ff921
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/hev-socks5-tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,11 +547,6 @@ hev_socks5_tunnel_init (int tun_fd)

hev_task_mutex_init (&mutex);

stat_tx_packets = 0;
stat_rx_packets = 0;
stat_tx_bytes = 0;
stat_rx_bytes = 0;

return 0;

exit:
Expand All @@ -569,6 +564,11 @@ hev_socks5_tunnel_fini (void)
event_task_fini ();
gateway_fini ();
tunnel_fini ();

stat_tx_packets = 0;
stat_rx_packets = 0;
stat_tx_bytes = 0;
stat_rx_bytes = 0;
}

int
Expand Down

0 comments on commit 09ff921

Please sign in to comment.