http_tracker connection fix

This commit is contained in:
Arvid Norberg 2008-02-07 07:15:23 +00:00
parent a53473a65d
commit 196f9c3544
1 changed files with 3 additions and 0 deletions

View File

@ -192,6 +192,9 @@ namespace libtorrent
void http_tracker_connection::on_response(asio::error_code const& ec
, http_parser const& parser, char const* data, int size)
{
// keep this alive
boost::intrusive_ptr<http_tracker_connection> me(this);
if (!parser.header_finished())
{
fail(-1, "premature end of file");