-
Notifications
You must be signed in to change notification settings - Fork 3
Description
This happens very frequently, and it leads to the connection being broken.
Its unclear why it is happening, but my leading hypothesis is that something is bad with the state management inside the extension, or that libtorrent is dropping the alert due to alert congestion.
Notes from Slack
this may be a good place to either add some debug prints, or to run in debug mode to see if any asserts fail
template <class ConnectionIdType>
void Buying<ConnectionIdType>::receivedFullPiece(const ConnectionIdType & id, const protocol_wire::PieceData & p)
also adding logs to
void TorrentPlugin::on_piece_pass(int index)
void TorrentPlugin::on_piece_failed(int index)
where we see indexcan indication on whether libtorrent actually ever gets back to us about piece
thats a key question I think one thing which is different about the downloading we are doing now, is that it mixes paying and free pieces perhaps libtorrent is ignoring telling us about a piece it has already validated and stored here is the call we make to tell libtorrent about hte piece
here is the call we make to tell libtorrent about hte piece
// Tell libtorrent to validate piece
// last argument is a flag which presently seems to only test
// flags & torrent::overwrite_existing, which seems to be whether
// the piece should be overwritten if it is already present
//
// libtorrent::torrent_plugin::on_piece_pass()
// libtorrent::torrent_plugin::on_piece_failed()
// processes result of checking
torrent()->add_piece(index, pieceData.piece().get(), 0);
perhaps logging before that line is also worth while
