Replace OSError() with socket.SocketError()