mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
remove unnecessary assertion in dns_dispatch_connect()
When a thread calls dns_dispatch_connect() on an unconnected TCP socket it sets `tcpstate` from `DNS_DISPATCHSTATE_NONE` to `_CONNECTING`. Previously, it then INSISTed that there were no pending connections before calling isc_nm_tcpdnsconnect(). If a second thread called dns_dispatch_connect() during that window of time, it could add a pending connection to the list, and trigger an assertion failure. This commit removes the INSIST since the condition is actually harmless.
This commit is contained in:
@@ -1812,7 +1812,6 @@ dns_dispatch_connect(dns_dispentry_t *resp) {
|
||||
case DNS_DISPATCHSTATE_NONE:
|
||||
/* First connection, continue with connecting */
|
||||
LOCK(&disp->lock);
|
||||
INSIST(ISC_LIST_EMPTY(disp->pending));
|
||||
ISC_LIST_APPEND(disp->pending, resp, plink);
|
||||
UNLOCK(&disp->lock);
|
||||
dns_dispatch_attach(disp, &(dns_dispatch_t *){ NULL });
|
||||
|
Reference in New Issue
Block a user