Skip to content

Commit

Permalink
catching up to tls 1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kazu-yamamoto committed Aug 7, 2023
1 parent 43cbff2 commit 73d1a4e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions http-client-tls/Network/HTTP/Client/TLS.hs
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,19 @@ mkManagerSettingsContext' set mcontext tls sockHTTP sockHTTPS = set
, managerRetryableException = \e ->
case () of
()
#if MIN_VERSION_tls(1,8,0)
| ((fromException e)::(Maybe TLS.TLSException))==Just (TLS.PostHandshake TLS.Error_EOF) -> True
#else
| ((fromException e)::(Maybe TLS.TLSError))==Just TLS.Error_EOF -> True
#endif
| otherwise -> managerRetryableException defaultManagerSettings e
, managerWrapException = \req ->
let wrapper se
| Just (_ :: IOException) <- fromException se = se'
| Just (_ :: TLS.TLSException) <- fromException se = se'
#if !MIN_VERSION_tls(1,8,0)
| Just (_ :: TLS.TLSError) <- fromException se = se'
#endif
| Just (_ :: NC.LineTooLong) <- fromException se = se'
| Just (_ :: NC.HostNotResolved) <- fromException se = se'
| Just (_ :: NC.HostCannotConnect) <- fromException se = se'
Expand Down

0 comments on commit 73d1a4e

Please sign in to comment.