Catch socket timeout error

Needs to be verified if this actually catches the error and if it doesn't cause double callbacks.
Merge pull request #14 from 5an1ty/patch-1

Catch socket timeout error