fixed exception issue when tracker sends invalid response

This commit is contained in:
Arvid Norberg 2008-06-03 20:03:51 +00:00
parent b4c160e723
commit 8b5172d439
1 changed files with 8 additions and 1 deletions

View File

@ -225,7 +225,14 @@ namespace libtorrent
}
// handle tracker response
entry e = bdecode(data, data + size);
entry e;
#ifndef BOOST_NO_EXCEPTIONS
try {
#endif
e = bdecode(data, data + size);
#ifndef BOOST_NO_EXCEPTIONS
} catch (std::exception&) {}
#endif
if (e.type() != entry::undefined_t)
{