Simplified socket error handling