File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -299,8 +299,13 @@ Also send data in EXTRA-ALIST."
299299 (url-request-data data)
300300 (url-request-extra-headers
301301 '((" Content-Type" . " application/x-www-form-urlencoded" )))
302- ; ; TODO: using `aio-url-retrieve' sometimes results in a hung connection
303- (response-buffer (cdr (aio-await (aio-url-retrieve url))))
302+ ; ; TODO: using `aio-url-retrieve' sometimes results in a hung
303+ ; ; connection, so we fall back to ‘url-retrieve-synchronously’ instead.
304+ ; ; This method shouldn’t be called very often, only when obtaining the
305+ ; ; initial access token and when refreshing tokens, which only happens
306+ ; ; every hour or so. Therefore I think this is an acceptable workaround
307+ ; ; for now.
308+ (response-buffer (aio-await (url-retrieve-synchronously url)))
304309 (response (with-current-buffer response-buffer
305310 (prog1 (oauth2-auto--request-access-parse)
306311 (kill-buffer (current-buffer ))))))
You can’t perform that action at this time.
0 commit comments