handle timeouts & general socket errors