Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed: Curl should also retry on CURLE_COULDNT_CONNECT

fixed: Curl reconnect messages should be warnings
changed: Cosmetics
  • Loading branch information...
commit d70bd1064c1314913bc69a260c4cbd423b1fb841 1 parent 1e7c4ae
arnova authored
Showing with 6 additions and 5 deletions.
  1. +6 −5 xbmc/filesystem/CurlFile.cpp
View
11 xbmc/filesystem/CurlFile.cpp
@@ -1201,7 +1201,7 @@ unsigned int CCurlFile::CReadState::Read(void* lpBuf, int64_t uiBufSize)
/* 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;
@@ -1249,18 +1249,19 @@ bool CCurlFile::CReadState::FillBuffer(unsigned int want)
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;
@@ -1286,7 +1287,7 @@ bool CCurlFile::CReadState::FillBuffer(unsigned int want)
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);
Please sign in to comment.
Something went wrong with that request. Please try again.