Fixed server networking bug

This commit is contained in:
Pauli Nieminen 2008-05-20 11:47:58 +00:00
parent 3db5649d77
commit de7fa767b4

View file

@ -304,7 +304,8 @@ static SOCKET_STATE send_buffer(TCPsocket sock, std::vector<char>& buf)
}
const int res = SDLNet_TCP_Send(sock, &buf[upto], static_cast<int>(size - upto));
if(!raw_data_only && res == static_cast<int>(size - upto)) {
if(res == static_cast<int>(size - upto)) {
if (!raw_data_only)
{
const threading::lock lock(*stats_mutex);
transfer_stats[sock].first.transfer(static_cast<size_t>(res));