handle refused connections
Merge pull request #3 from amirmanji/connection_refused

handle refused connections