Re-resolve IP address from DNS name after connection failure to cope with changed IP address.
Merge pull request #2 from aeijae/master

Re-resolve IP address from DNS name after connection failure