Handle Connection refused exceptions, returning False