BUG/MEDIUM: dns: reset file descriptor if send returns an error

The fd is purged if send returns -1 without EAGAIN and the
sock.fd is set to -1 to recreate a new fd on next
sending attempt on this nameserver.

Before this fix we continue to send on the fd returning
an error indefinitely.

This patch applies on branch 2.3 and is fixed in newer versions
by this commit (d26a6237ad):
'MEDIUM: resolvers: split resolving and dns message exchange layers'

This patch should be backported an all supported branches 1.6 <= v <= 2.3
1 file changed