The TCP dispatches in DNS_DISPATCHSTATE_NONE could be either very
fresh or those could be dispatches that failed connecting to the
destination. Ignore them when trying to connect to an existing
TCP dispatch via dns_dispatch_gettcp().
isc_sockaddr_eqaddr(localaddr, &sockname)))
{
switch (disp->state) {
+ case DNS_DISPATCHSTATE_NONE:
+ /* Dispatch in indeterminate state */
+ break;
case DNS_DISPATCHSTATE_CONNECTED:
/* We found a connected dispatch */
dns_dispatch_attach(disp, &disp_connected);
break;
- case DNS_DISPATCHSTATE_NONE:
case DNS_DISPATCHSTATE_CONNECTING:
/* We found "a" dispatch, store it for later */
if (disp_fallback == NULL) {