Fix tcpidle close bind socket issue
This commit is contained in:
@@ -2532,6 +2532,10 @@ static void _dns_server_tcp_idle_check(void)
|
|||||||
time(&now);
|
time(&now);
|
||||||
list_for_each_entry_safe(conn, tmp, &server.conn_list, list)
|
list_for_each_entry_safe(conn, tmp, &server.conn_list, list)
|
||||||
{
|
{
|
||||||
|
if (conn->type != DNS_CONN_TYPE_TCP_CLIENT && conn->type != DNS_CONN_TYPE_TLS_CLIENT) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (conn->last_request_time > now - dns_conf_tcp_idle_time) {
|
if (conn->last_request_time > now - dns_conf_tcp_idle_time) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user