fixed inconsistent upload_only and seed in some cases when running a metadata-less torrent

This commit is contained in:
Arvid Norberg 2008-09-19 23:02:45 +00:00
parent 064d93b935
commit f3d542fb2c
2 changed files with 3 additions and 0 deletions

View File

@ -2635,6 +2635,8 @@ namespace libtorrent
TORRENT_ASSERT(!m_rc4_encrypted || m_RC4_handler.get());
#endif
if (is_seed()) TORRENT_ASSERT(upload_only());
if (!in_handshake())
{
TORRENT_ASSERT(m_sent_handshake);

View File

@ -519,6 +519,7 @@ namespace libtorrent
#endif
// if this is a web seed. we don't have a peer_info struct
if (m_peer_info) m_peer_info->seed = true;
m_upload_only = true;
t->peer_has_all();
if (t->is_finished()) send_not_interested();