extend peer_plugin to also be notified of disconnects and successful connect events
This commit is contained in:
@@ -3469,6 +3469,13 @@ namespace libtorrent
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef TORRENT_DISABLE_EXTENSIONS
|
||||
for (extension_list_t::iterator i = m_extensions.begin()
|
||||
, end(m_extensions.end()); i != end; ++i)
|
||||
{
|
||||
(*i)->on_disconnect(ec);
|
||||
}
|
||||
#endif
|
||||
// for incoming connections, we get invalid argument errors
|
||||
// when asking for the remote endpoint and the socket already
|
||||
// closed, which is an edge case, but possible to happen when
|
||||
@@ -5576,6 +5583,14 @@ namespace libtorrent
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef TORRENT_DISABLE_EXTENSIONS
|
||||
for (extension_list_t::iterator i = m_extensions.begin()
|
||||
, end(m_extensions.end()); i != end; ++i)
|
||||
{
|
||||
(*i)->on_connected();
|
||||
}
|
||||
#endif
|
||||
|
||||
on_connected();
|
||||
setup_send();
|
||||
setup_receive();
|
||||
|
Reference in New Issue
Block a user