src/utils_oauth.c: Renew OAuth tokens 30 seconds before they expire.
authorFlorian Forster <octo@collectd.org>
Wed, 24 Oct 2018 08:07:08 +0000 (10:07 +0200)
committerFlorian Forster <octo@collectd.org>
Wed, 24 Oct 2018 08:07:11 +0000 (10:07 +0200)
commita084f3dda79b648c52ef759d97bbd5015b206696
tree6bff28446f04413770e636e577da6b37c0f376e2
parentffd3d91a3523381554d2199d97cb0fa538d1985b
src/utils_oauth.c: Renew OAuth tokens 30 seconds before they expire.

This solves sporious errors like this one:

    write_stackdriver plugin: POST https://monitoring.googleapis.com/v3/projects/{projectId}/timeSeries:
      API error 401: Request had invalid authentication credentials.
      Expected OAuth 2 access token, login cookie or other valid authentication credential.
      See https://developers.google.com/identity/sign-in/web/devconsole-project.
src/utils_oauth.c