

def get_sock_error(sock):
    error_number = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR)
    return socket.error(error_number, os.strerror(error_number))

dataset/ETHPy150Open ziggear/shadowsocks/shadowsocks/eventloop.py get_sock_error/original