fix bug in read cache expiration logic

This commit is contained in:
Arvid Norberg
2011-03-15 02:54:41 +00:00
parent d6fbff13df
commit 5e273aff34

View File

@@ -496,8 +496,8 @@ namespace libtorrent
if (i == idx.end()) return 0;
}
// don't replace an entry that is is too young
if (time_now() > i->expire) return 0;
// don't replace an entry that hasn't expired yet
if (time_now() < i->expire) return 0;
int blocks = 0;
// build a vector of all the buffers we need to free