log the specific reason why the connection doesn't retry
Merge branch 'master' of https://github.com/nicboul/DNDS
add missing #include on OSX for dirname() and chdir()