Fix for pydns >= 2.3.6

Pydns 2.3.6 signals UDP "connection refused" with a different exception
than earlier versions.

(This issue was exercised by the relocation of the sleep() from the top
to the bottom of the retry loop in 29b5750.)