• Dan Winship's avatar
    gsocket: add G_IO_ERROR_CONNECTION_CLOSED · 967fedc0
    Dan Winship authored
    Add G_IO_ERROR_CONNECTION_CLOSED as an alias for
    G_IO_ERROR_BROKEN_PIPE, and also return it on ECONNRESET.
    It doesn't really make sense to try to distinguish EPIPE and
    ECONNRESET at the GLib level, since the exact choice of which error
    gets returned in what conditions depends on the OS. Given that, we
    ought to map the two errors to the same value, and since we're already
    mapping EPIPE to G_IO_ERROR_BROKEN_PIPE, we need to map ECONNRESET to
    that too. But the existing name doesn't really make sense for sockets,
    so we add a new name.
gioerror.c 6.67 KB