Fixed incorrect iterator usage revealed by libstdc++ debug mode.

Fixed "error: attempt to dereference a singular iterator" error when
running unit tests compiled with -D_GLIBCXX_DEBUG.
This commit is contained in:
Sergey Popov 2008-12-23 11:48:25 +00:00
parent fee2e0b4c6
commit fd6d9dd86d

View File

@ -905,8 +905,8 @@ TCPsocket get_received_data(TCPsocket sock, config& cfg, bool* gzipped,network::
buffer* buf = *itor;
if (gzipped)
*gzipped = buf->gzipped;
received_data_queue.erase(itor);
bandwidth_in.reset(new network::bandwidth_in((*itor)->raw_buffer.size()));
received_data_queue.erase(itor);
delete buf;
return res;
}