|
|
|
@ -352,13 +352,13 @@ void tcp_proxy_server_handle_close(struct UTUN_INSTANCE* inst, uint32_t stream_i |
|
|
|
rc->cli_closed = 1; |
|
|
|
rc->cli_closed = 1; |
|
|
|
if (!rc->tc) { tcp_proxy_server_conn_free(rc); return; } |
|
|
|
if (!rc->tc) { tcp_proxy_server_conn_free(rc); return; } |
|
|
|
tcp_conn_pause_read(rc->tc); |
|
|
|
tcp_conn_pause_read(rc->tc); |
|
|
|
|
|
|
|
queue_set_callback(rc->tc->read_queue, NULL, NULL); |
|
|
|
{ |
|
|
|
{ |
|
|
|
struct ll_entry* e; |
|
|
|
struct ll_entry* e; |
|
|
|
while ((e = queue_data_get(rc->tc->read_queue))) { |
|
|
|
while ((e = queue_data_get(rc->tc->read_queue))) { |
|
|
|
memory_pool_free(rc->tc->data_pool, e->dgram); |
|
|
|
memory_pool_free(rc->tc->data_pool, e->dgram); |
|
|
|
queue_entry_free(e); |
|
|
|
queue_entry_free(e); |
|
|
|
} |
|
|
|
} |
|
|
|
queue_resume_callback(rc->tc->read_queue); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if (rc->tc->connected) tcp_conn_push_close(rc->tc); else tcp_proxy_server_conn_free(rc); |
|
|
|
if (rc->tc->connected) tcp_conn_push_close(rc->tc); else tcp_proxy_server_conn_free(rc); |
|
|
|
} |
|
|
|
} |
|
|
|
|