fix issue querying block size from torrent before metadata has been received
This commit is contained in:
parent
d8ebcc7f0c
commit
282c49d6b5
|
@ -846,7 +846,7 @@ namespace libtorrent {
|
|||
|
||||
int block_size() const
|
||||
{
|
||||
return m_torrent_file
|
||||
return valid_metadata()
|
||||
? (std::min)(m_torrent_file->piece_length(), default_block_size)
|
||||
: default_block_size;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue