Re: [libtorrent] too many connections error on peer_plugin
Brought to you by:
arvidn
From: arvid <ar...@cs...> - 2015-04-23 00:52:09
|
On 2015-04-22 09:56, Bedeho Mender wrote: > After installing a torrent plugin on a torrent, an external peer > connects > to us, and a peer plugin is installed on this connection. > > Some times it happens that that peer_plugin::on_disconnect() is > immediately > called with the error "too many connections", and the connection is > dropped. Other times not. > > Why would this be? It means you hit the upper limit of number of connections, either the global limit or per torrent limit (or some other limit) > Why would this be an error for only one or two > connections, when docs say for session_settings::connections_limit: presumably whenever you exceed the limit, some connection is disconnected. It may be the one that just connected to you or it may be some other connection. > "sets a global limit on the number of connections opened. The number of > connections is set to a hard minimum of at least two per torrent, so if > you > set a too low connections limit, and open too many torrents, the limit > will > not be met." most of that text just says that you can't set the peer connection limit to less than: 2 * num_torrents. It doesn't say it won't disconnect peers when the limit is hit. -- Arvid Norberg |