handle timeout while trying to connect
Merge pull request #9 from ianshward/callback-on-timeout

handle timeout while trying to connect