Don't log EOF as error.
This commit is contained in:
+7
-1
@@ -65,10 +65,16 @@ void Connection::DoRead() {
|
|||||||
|
|
||||||
void Connection::OnRead(boost::system::error_code ec, std::size_t length) {
|
void Connection::OnRead(boost::system::error_code ec, std::size_t length) {
|
||||||
if (ec) {
|
if (ec) {
|
||||||
LOG_ERRO("Socket read error (%s).", ec.message().c_str());
|
if (ec == boost::asio::error::eof) {
|
||||||
|
LOG_WARN("Socket read EOF.");
|
||||||
|
} else {
|
||||||
|
LOG_ERRO("Socket read error (%s).", ec.message().c_str());
|
||||||
|
}
|
||||||
|
|
||||||
if (ec != boost::asio::error::operation_aborted) {
|
if (ec != boost::asio::error::operation_aborted) {
|
||||||
pool_->Close(shared_from_this());
|
pool_->Close(shared_from_this());
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user