mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-16 18:31:32 +00:00
Handle asio::error::eof to properly log client initiated disconnects
This commit is contained in:
parent
e33f622377
commit
8710ec2bbc
@ -165,7 +165,10 @@ std::string client_address(socket_ptr socket)
|
||||
bool check_error(const boost::system::error_code& error, socket_ptr socket)
|
||||
{
|
||||
if(error) {
|
||||
ERR_SERVER << client_address(socket) << "\t" << error.message() << "\n";
|
||||
if(error == boost::asio::error::eof)
|
||||
LOG_SERVER << client_address(socket) << "\tconnection closed\n";
|
||||
else
|
||||
ERR_SERVER << client_address(socket) << "\t" << error.message() << "\n";
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user