Fix possible cause of crash after metadata download

pull/749/head
Tatsuhiro Tsujikawa 2016-09-05 22:44:40 +09:00
parent 3af50e5140
commit 8cdcb71308
2 changed files with 1 additions and 1 deletions

View File

@ -155,6 +155,7 @@ bool UDPAnnRequest::success() const
void UDPAnnRequest::stop(DownloadEngine* e)
{
if (req_) {
req_->user_data = nullptr;
req_.reset();
}
}

View File

@ -151,7 +151,6 @@ int UDPTrackerClient::receiveReply(std::shared_ptr<UDPTrackerRequest>& recvReq,
logInvalidTransaction(remoteAddr, remotePort, action, transactionId);
return -1;
}
req->state = UDPT_STA_COMPLETE;
auto connectionId = bittorrent::getLLIntParam(data, 8);
A2_LOG_INFO(