Fix tcpidle close bind socket issue

This commit is contained in:
Nick Peng
2019-08-03 02:45:30 +08:00
parent 9a23bf6113
commit 77bce2e7c6

View File

@@ -2532,6 +2532,10 @@ static void _dns_server_tcp_idle_check(void)
time(&now);
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) {
continue;
}