Skip to content

Commit 224b581

Browse files
committed
Modify log output
1 parent b2162c9 commit 224b581

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

trantor/net/inner/TcpConnectionImpl.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,12 @@ void TcpConnectionImpl::handleError()
254254
int err = _socketPtr->getSocketError();
255255
if (err == 0)
256256
return;
257-
if (err != 104)
258-
LOG_ERROR << "TcpConnectionImpl::handleError [" << _name
259-
<< "] - SO_ERROR = " << err << " " << strerror_tl(err);
257+
if (err == EPIPE || err == ECONNRESET || err == 104)
258+
LOG_DEBUG << "[" << _name << "] - SO_ERROR = " << err << " "
259+
<< strerror_tl(err);
260260
else
261-
LOG_INFO << "TcpConnectionImpl::handleError [" << _name
262-
<< "] - SO_ERROR = " << err << " " << strerror_tl(err);
261+
LOG_ERROR << "[" << _name << "] - SO_ERROR = " << err << " "
262+
<< strerror_tl(err);
263263
}
264264
void TcpConnectionImpl::setTcpNoDelay(bool on)
265265
{

0 commit comments

Comments
 (0)