fixed assert when connecting to upload-only peers

This commit is contained in:
Arvid Norberg 2008-09-07 01:01:25 +00:00
parent cc67830faf
commit fddd1ee8e2
1 changed files with 6 additions and 1 deletions

View File

@ -215,7 +215,12 @@ namespace libtorrent
bool is_seed() const; bool is_seed() const;
void set_upload_only(bool u) { m_upload_only = u; } void set_upload_only(bool u)
{
m_upload_only = u;
disconnect_if_redundant();
}
bool upload_only() const { return m_upload_only; } bool upload_only() const { return m_upload_only; }
// will send a keep-alive message to the peer // will send a keep-alive message to the peer