Skip to content

Commit

Permalink
sandwich-contexts: support crypton-connection >= 0.4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjm committed Jul 20, 2024
1 parent fa957c5 commit 2879ca1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sandwich-contexts/lib/Test/Sandwich/Contexts/Waits.hs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ import UnliftIO.Exception
import UnliftIO.Retry
import UnliftIO.Timeout

#if MIN_VERSION_crypton_connection(0,4,0)
import Data.Default (def)
#endif


-- | Keep trying an action up to a timeout while it fails with a 'FailureReason'.
-- Use exponential backoff, with delays capped at 1 second.
Expand Down Expand Up @@ -95,6 +99,9 @@ tlsNoVerifySettings = mkManagerSettings tlsSettings Nothing
settingDisableCertificateValidation = True
, settingDisableSession = False
, settingUseServerName = False
#if MIN_VERSION_crypton_connection(0,4,0)
, settingsClientSupported = def
#endif
}

-- | Send HTTP requests to url until we get a response with an given code.
Expand Down
1 change: 1 addition & 0 deletions sandwich-contexts/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ library:
- containers
- crypton-connection
- exceptions
- data-default
- filepath
- http-client
- http-conduit
Expand Down
1 change: 1 addition & 0 deletions sandwich-contexts/sandwich-contexts.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ library
, conduit-extra
, containers
, crypton-connection
, data-default
, exceptions
, filepath
, http-client
Expand Down

0 comments on commit 2879ca1

Please sign in to comment.