Skip to content

remove unnecessary assertion in dns_dispatch_connect()

Evan Hunt requested to merge 3456-dispatch-connect-race into main

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.

Closes #3456 (closed)

Merge request reports