In some cases, dns::resolve may end up closing its socket "twice". Since the socket name might have been re-allocated in the meantime, thi causes someone elese's socket to get closed.
This patch fixes this by setting the socket name to "nil" just after closing it.
dns-socket-closing