trantor
trantor copied to clipboard
TcpConnectionImpl.cc logs the connections aborted by a client as an unexpected error
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.