summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Uko Kokņevičs2025-10-23 10:54:54 +0300
committerGravatar Uko Kokņevičs2025-10-23 10:54:54 +0300
commit48d3f439d82385d85fd2c7ba9d506a2ccb6bab1c (patch)
tree2d262641d6a215ba39ea255e7fe50f094468c436 /src
parentSome extra code to deal with bad responses (diff)
downloadukkoclot-48d3f439d82385d85fd2c7ba9d506a2ccb6bab1c.tar.gz
ukkoclot-48d3f439d82385d85fd2c7ba9d506a2ccb6bab1c.tar.xz
ukkoclot-48d3f439d82385d85fd2c7ba9d506a2ccb6bab1c.zip
handler-case doesn't allow restarts
Diffstat (limited to 'src')
-rw-r--r--src/transport.lisp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/transport.lisp b/src/transport.lisp
index 52d0dcf..bcdf3bc 100644
--- a/src/transport.lisp
+++ b/src/transport.lisp
@@ -26,15 +26,10 @@
26 ;; This is needed to avoid hangs, 26 ;; This is needed to avoid hangs,
27 ;; see https://github.com/fukamachi/dexador/issues/91#issuecomment-1093472364 27 ;; see https://github.com/fukamachi/dexador/issues/91#issuecomment-1093472364
28 (cl+ssl:*default-unwrap-stream-p* nil)) 28 (cl+ssl:*default-unwrap-stream-p* nil))
29 (handler-case (dex:request uri :method method :content content :read-timeout 60 :connect-timeout 60) 29 (handler-bind ((dex:http-request-too-many-requests #'dex:ignore-and-continue)
30 ;; We deal with too many requests manually 30 (dex:http-request-failed retrier)
31 (dex:http-request-too-many-requests (e) (dex:ignore-and-continue e)) 31 (cl+ssl::ssl-error retrier))
32 (dex:http-request-failed (e) 32 (dex:request uri :method method :content content :read-timeout 60 :connect-timeout 60))))
33 (log:warn "HTTP request failed: ~A" e)
34 (funcall retrier e))
35 (cl+ssl::ssl-error (e)
36 (log:warn "SSL error: ~A" e)
37 (funcall retrier e)))))
38 33
39;; TODO: (alist string t) 34;; TODO: (alist string t)
40(-> do-call% (http-method string t list) t) 35(-> do-call% (http-method string t list) t)