File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
http-client-tls/Network/HTTP/Client Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ import Data.ByteArray.Encoding (convertToBase, Base (Base16))
4040mkManagerSettings :: NC. TLSSettings
4141 -> Maybe NC. SockSettings
4242 -> ManagerSettings
43- mkManagerSettings = mkManagerSettingsContext Nothing
43+ mkManagerSettings = mkManagerSettingsContext ( Just globalContext)
4444
4545-- | Same as 'mkManagerSettings', but also takes an optional
4646-- 'NC.ConnectionContext'. Providing this externally can be an
@@ -83,7 +83,11 @@ mkManagerSettingsContext mcontext tls sock = defaultManagerSettings
8383
8484-- | Default TLS-enabled manager settings
8585tlsManagerSettings :: ManagerSettings
86- tlsManagerSettings = mkManagerSettings def Nothing
86+ tlsManagerSettings = mkManagerSettingsContext (Just globalContext) def Nothing
87+
88+ globalContext :: NC. ConnectionContext
89+ globalContext = unsafePerformIO NC. initConnectionContext
90+ {-# NOINLINE globalContext #-}
8791
8892getTlsConnection :: Maybe NC. ConnectionContext
8993 -> Maybe NC. TLSSettings
You can’t perform that action at this time.
0 commit comments