/* use to attempt to fill the read buffer up to requested number of bytes */
bool CCurlFile::CReadState::FillBuffer(unsigned int want)
{
- int retry=0;
+ int retry = 0;
fd_set fdread;
fd_set fdwrite;
fd_set fdexcep;
CLog::Log(LOGWARNING, "%s: curl failed with code %i", __FUNCTION__, msg->data.result);
- // We need to check the data.result here as we don't want to retry on every error
+ // We need to check the result here as we don't want to retry on every error
if ( (msg->data.result == CURLE_OPERATION_TIMEDOUT ||
msg->data.result == CURLE_PARTIAL_FILE ||
+ msg->data.result == CURLE_COULDNT_CONNECT ||
msg->data.result == CURLE_RECV_ERROR) &&
!m_bFirstLoop)
- CURLresult=msg->data.result;
+ CURLresult = msg->data.result;
else
return false;
}
}
- // Don't retry, when we didn't "see" any error
+ // Don't retry when we didn't "see" any error
if (CURLresult == CURLE_OK)
return false;
return false;
}
- CLog::Log(LOGDEBUG, "%s: Reconnect, (re)try %i", __FUNCTION__, retry);
+ CLog::Log(LOGWARNING, "%s: Reconnect, (re)try %i", __FUNCTION__, retry);
// Connect + seek to current position (again)
g_curlInterface.easy_setopt(m_easyHandle, CURLOPT_RESUME_FROM_LARGE, m_filePos);