Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
madeye committed Jan 31, 2020
1 parent c142d9c commit 0f89d71
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions tun2socks/SocksUdpGwClient.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,6 @@ void SocksUdpGwClient_Free (SocksUdpGwClient *o)

void SocksUdpGwClient_SubmitPacket (SocksUdpGwClient *o, BAddr local_addr, BAddr remote_addr, int is_dns, const uint8_t *data, int data_len)
{
BLog(BLOG_ERROR, "Submit a packet");

DebugObject_Access(&o->d_obj);
// see asserts in UdpGwClient_SubmitPacket

Expand All @@ -612,19 +610,14 @@ void SocksUdpGwClient_SubmitPacket (SocksUdpGwClient *o, BAddr local_addr, BAddr

// if no connection and can't create a new one, reuse the least recently used une
if (!con && o->num_connections == o->max_connections) {
BLog(BLOG_ERROR, "Reuse connection");
remove_lru_connection(o, conaddr, is_dns);
}

if (!con) {
// create new connection
con = connection_init(o, conaddr, data, data_len, is_dns);

BLog(BLOG_ERROR, "Create a new conncection");

} else {
BLog(BLOG_ERROR, "Reset a conncection");

// reset the connection
reset_connection(o, con, conaddr, is_dns);

Expand Down

0 comments on commit 0f89d71

Please sign in to comment.