Handles refused connections
Merge pull request #6 from mpath/conn_err

Handles refused connections