@@ -716,7 +716,9 @@ data HttpConfig = HttpConfig
716716 -- @since 0.3.0
717717 httpConfigRetryJudge :: forall b. RetryStatus -> L.Response b -> Bool,
718718 -- | Similar to 'httpConfigRetryJudge', but is used to decide when to
719− -- retry requests that resulted in an exception.
719+ -- retry requests that resulted in an exception. By default it retries
720+ -- on response timeout and connection timeout (changed in version
721+ -- /3.8.0/).
720722 --
721723 -- @since 3.4.0
722724 httpConfigRetryJudgeException :: RetryStatus -> SomeException -> Bool,
@@ -750,7 +752,14 @@ defaultHttpConfig =
750752 598, -- (Informal convention) Network read timeout error
751753 599 -- (Informal convention) Network connect timeout error
752754 ],
753− httpConfigRetryJudgeException = \_ _ -> False,
755+ httpConfigRetryJudgeException = \_ e ->
756+ case fromException e of
757+ Just (L.HttpExceptionRequest _ c) ->
758+ case c of
759+ L.ResponseTimeout -> True
760+ L.ConnectionTimeout -> True
761+ _ -> False
762+ _ -> False,
754763 httpConfigBodyPreviewLength = 1024
755764 }
756765 where