Official eMule-Board: Http Downloads Aborting - Official eMule-Board

Jump to content


Page 1 of 1

Http Downloads Aborting Includes a possible fix

#1 User is offline   tHeWiZaRdOfDoS 

  • Man, what a bunch of jokers...
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5630
  • Joined: 28-December 02

Posted 09 June 2012 - 05:05 PM

When downloading from HTTP sources, you will notice that your download will stop after some time. To fix this, apply this change:

Quote

void CUrlClient::OnSocketConnected(int nErrorCode)
{
if (nErrorCode == 0)
{
ConnectionEstablished(); // >>> WiZaRd - We connected successfully!
SetDownStartTime(); //>>> WiZaRd - fix download time
SendHttpBlockRequests();
}
}


This was rather easy to find out as we have a nice ASSERT in CUpDownClient::Disconnected() which fires on that occasion: ASSERT( m_nConnectingState == CCS_NONE );
The issue is caused by the following scenario:
In CUrlClient::Connect() we wait for the socket to connect and start downloading afterwards but we don't update the client instance once the socket actually connected.
CClientList::ProcessConnectingClientsList() will thus close the socket and terminate the download as it is indicated to be in connecting state for too long while the socket is actually connected "working" properly.

IMHO the fix is valid but there may be a more proper way to fix that problem :)
2

#2 User is offline   Some Support 

  • Last eMule
  • PipPipPipPipPipPipPip
  • Group: Yes
  • Posts: 3667
  • Joined: 27-June 03

Posted 10 June 2012 - 08:28 AM

Thanks, will look into it

  • Member Options

Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users