Rescues socket error exceptions, fixes #9