option to ignore bandwidth limits for local peers. fixed some asserts when allowing multiple connections per IP

This commit is contained in:
Arvid Norberg
2007-05-25 17:06:30 +00:00
parent c48bba388e
commit 685f79b82f
7 changed files with 91 additions and 23 deletions

View File

@@ -1215,7 +1215,11 @@ namespace libtorrent
throw protocol_error("duplicate peer-id, connection closed");
}
}
}
if (pid == m_ses.get_peer_id())
{
throw protocol_error("closing connection to ourself");
}
#ifndef TORRENT_DISABLE_DHT