Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stability fixes #217

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Stability fixes #217

wants to merge 3 commits into from

Commits on Nov 26, 2013

  1. Add delay before auth token refresh

    This is sometimes necessary to prevent too frequent requests.
    Visa Putkinen committed Nov 26, 2013
    Configuration menu
    Copy the full SHA
    b0d986a View commit details
    Browse the repository at this point in the history
  2. Fix hang when upload receives HTTP 500

    When an uploading PUT request got a HTTP 500 as reponse, grive hanged
    forever inside libcurl. This was because the File parameter was not
    rewound to 0 position on retry. The XmlResponse had to be cleared as
    well.
    
    Rewinding the File and clearing the XmlResponse were not enough to fix
    the problem, because when retrying after 500, HTTP 410 Gone or 412
    Precondition failed is often received, and CheckHttpResponse would throw
    an exception that crashes grive. Therefore, I implemented a retry logic
    to Resource::Upload that retries the whole upload transaction if 410 or
    412 was received.
    Visa Putkinen committed Nov 26, 2013
    Configuration menu
    Copy the full SHA
    a11eae8 View commit details
    Browse the repository at this point in the history
  3. Retry upload on XML error instead of crashing

    Sometimes the Google Drive API sends malformed XML which crashes grive.
    This patch adds a simple try-catch to Resource::Upload that retries the
    upload if an XML exception is thrown from AuthAgent::Put.
    Visa Putkinen committed Nov 26, 2013
    Configuration menu
    Copy the full SHA
    307c934 View commit details
    Browse the repository at this point in the history