Catch socket timeout error

Needs to be tested if this doesn't cause double callbacks and actually catches the socket error.