forked from premiere/premiere-libtorrent
fixed possible problem with errors occuring and reported to dht_tracker::on_receive.
This commit is contained in:
parent
5ef57265bf
commit
e340485974
|
@ -297,12 +297,16 @@ namespace libtorrent { namespace dht
|
|||
void dht_tracker::on_receive(asio::error const& error, size_t bytes_transferred)
|
||||
try
|
||||
{
|
||||
if (error == asio::error::operation_aborted) return;
|
||||
|
||||
int current_buffer = m_buffer;
|
||||
m_buffer = (m_buffer + 1) & 1;
|
||||
m_socket.async_receive_from(asio::buffer(&m_in_buf[m_buffer][0]
|
||||
, m_in_buf[m_buffer].size()), m_remote_endpoint[m_buffer]
|
||||
, bind(&dht_tracker::on_receive, this, _1, _2));
|
||||
|
||||
if (error) return;
|
||||
|
||||
#ifdef TORRENT_DHT_VERBOSE_LOGGING
|
||||
++m_total_message_input;
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue