Skip to content

Commit

Permalink
Fix debug message
Browse files Browse the repository at this point in the history
This outputs the config not the number of read bytes.
The recv_queue_.back() call was also missing lock protection.

(cherry-picked from commit 6dd3223)
  • Loading branch information
soliton- committed Oct 7, 2018
1 parent 90ff4ef commit d742afc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/wesnothd_connection.cpp
Expand Up @@ -320,12 +320,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();
}

Expand Down

0 comments on commit d742afc

Please sign in to comment.