JoystreamClassic / extension-cpp

C++ libtorrent extension library
MIT License
0 stars 3 forks source link

PeerPlugin events coming seemingly out of order (or illogical order) #11

Closed mnaamani closed 7 years ago

mnaamani commented 7 years ago

In joystream-node wrapper, when processing peer_connected_alert, peer_disconnected_alert, PeerPluginAdded/Removed alerts, it has proved to be very difficult to maintain a consistent (accurate) state of what peers we are connected to.

This has turned out to be a symptom of misinterpreting the meaning of some of the libtorrent alerts, timing of emplacing the plugin alerts, in addition to not taking into consideration half open connections (outgoing libtorrent connections) and how we are trying to maintain the _peers map in the TorrentPlugin (extension-cpp)

There is a case also where a connected peer that should have a peerplugin installed on it doesn't get one.

bedeho commented 7 years ago

Done in #13