Skip to content

TcpConnectionImpl.cc logs the connections aborted by a client as an unexpected error #278

Open
@VladlenPopolitov

Description

@VladlenPopolitov

TcpConnectionImpl.cc line 482

               if (errno == EPIPE || errno == ECONNRESET)  // TODO: any others?
                {
#ifdef _WIN32
                    LOG_TRACE << "WSAENOTCONN or WSAECONNRESET, errno="
                              << errno;
#else
                    LOG_TRACE << "EPIPE or ECONNRESET, errno=" << errno;
#endif
                    return;
                }
                LOG_SYSERR << "Unexpected error(" << errno << ")";
                return;

If client aborted connection (it has a right to do it in any moment, and it is not error in program logic (though error of write function), it should not be logged as unexpected error to attract attention. It should be or silenced, or reported as "Client aborted connection"
Otherwise, it look like error in the program code.

errno == 10053 , WSAECONNABORTED in Windows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions