Fix debug message

This outputs the config not the number of read bytes.
The recv_queue_.back() call was also missing lock protection.
This commit is contained in:
Gunter Labes 2018-04-21 09:41:10 +02:00
parent 996ae23e17
commit a58e2200ab

View file

@ -319,12 +319,13 @@ void wesnothd_connection::handle_read(const boost::system::error_code& ec, std::
std::istream is(&read_buf_);
config data;
read_gz(data, is);
if(!data.empty()) DBG_NW << "Received:\n" << data;
{
std::lock_guard<std::mutex> lock(recv_queue_mutex_);
recv_queue_.emplace_back(std::move(data));
}
DBG_NW << "Received " << recv_queue_.back() << " bytes.\n";
recv();
}