aboutsummaryrefslogtreecommitdiff
path: root/piem-b4.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2020-08-27 22:56:05 -0400
committerKyle Meyer <kyle@kyleam.com>2020-08-27 23:09:39 -0400
commit5cada85c7571956345f04e326c8af045cdb62131 (patch)
treea6312dbf2bd11968b873279fd6dc745396207e37 /piem-b4.el
parentf028f0c1b225f1522924e052e23f88f125a4ce4a (diff)
downloadpiem-5cada85c7571956345f04e326c8af045cdb62131.tar.gz
Switch downloads to url-retrieve-synchronously
piem-download-and-decompress uses url-retrieve and a callback, setting url-asynchronous to nil. This approach doesn't seem to be sufficient because I'm getting intermittent failures in piem-b4--get-am-files related to unfinished processes. And taking a peek at url-retrieve-synchronously suggests that indeed a good amount more is needed to do a synchronous call with url-retrieve. Switch piem-download-and-decompress over to url-retrieve-synchronously. I haven't noticed any issues with the url-retrieve call in piem-inject-thread-into-maildir, but switch that over too for simplicity and consistency. Message-Id: <20200828025605.1106-1-kyle@kyleam.com>
Diffstat (limited to 'piem-b4.el')
-rw-r--r--piem-b4.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/piem-b4.el b/piem-b4.el
index 39d32be..6de0d2b 100644
--- a/piem-b4.el
+++ b/piem-b4.el
@@ -68,12 +68,11 @@
(buffer (condition-case nil
(piem-download-and-decompress
(concat url mid "/t.mbox.gz"))
- (user-error nil))))
- (when (buffer-live-p buffer)
- (with-current-buffer buffer
- (write-region nil nil mbox-thread))
- (kill-buffer buffer)
- (setq local-mbox-p t))))
+ (error nil))))
+ (with-current-buffer buffer
+ (write-region nil nil mbox-thread))
+ (kill-buffer buffer)
+ (setq local-mbox-p t)))
;; Move to the coderepo so that we pick up any b4 configuration
;; from there.
(apply #'piem-process-call coderepo piem-b4-b4-executable "am"