diff --git a/src/net/common/serverlobbythread.cpp b/src/net/common/serverlobbythread.cpp index a9206e38..9f5fc924 100644 --- a/src/net/common/serverlobbythread.cpp +++ b/src/net/common/serverlobbythread.cpp @@ -371,7 +371,9 @@ ServerLobbyThread::CloseSession(boost::shared_ptr session) // Update stats (if needed). UpdateStatisticsNumberOfPlayers(); session->SetGame(boost::shared_ptr()); - session->GetAsioSocket()->shutdown(boost::asio::ip::tcp::socket::shutdown_receive); + // Ignore error when shutting down the socket. + boost::system::error_code ec; + session->GetAsioSocket()->shutdown(boost::asio::ip::tcp::socket::shutdown_receive, ec); // Close this session after send. GetSender().SetCloseAfterSend(session); // Cancel all timers of the session.