Giter VIP home page Giter VIP logo

Comments (4)

arvidn avatar arvidn commented on May 14, 2024

do you intend to issue a pull request for this patch? it looks reasonable as far as I can tell

from libtorrent.

mlt avatar mlt commented on May 14, 2024

I was planning to test this and that before submitting a pull request. Hence I called the branch work in progress to solicit comments. I'm not sure if the patch is enough. Eventually, I'd clean it up for a pull request. If you'd rather prefer a few shorter pull request, I'll do that.
There are quite a few (~3) assertions that still fail, e.g.

  1. deletion of a peer that failed to handshake on time (on second_tick) fails TORRENT_ASSERT(p->in_use); @ peer_list::connection_closed
  2. http_connection::on_connect often fails with m_connecting being false. Missing assignment at the end of http_connection::on_i2p_resolve ?
  3. TORRENT_ASSERT(pp->prev_amount_upload == 0); in torrent::remove_peer.I'm not sure yet when this happens.

Also I'm somewhat puzzled as how to reestablish connection, e.g. when i2p router died. It doesn't look like there is a provision to reestablish SAM connection.

from libtorrent.

arvidn avatar arvidn commented on May 14, 2024

one pull requests is fine. either way

from libtorrent.

arvidn avatar arvidn commented on May 14, 2024

as for number 3, when a peer connects, it takes the upload/download stats from the torrent_peer object and stores it in the peer_connection. It's supposed to set the fields in torrent_peer to 0 when it does this. Then as it uploads and downloads more bytes it increments those counters in peer_connection. When it disconnects, it puts back the stats. If the counters in torrent_peer are non-zero, that implies that either some other peer_connection was connected as the same peer, or it got disconnected so quickly after connecting that it never had time to zero those counters out (and perhaps not pick up the stats either)

from libtorrent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.