packages feed

warp-tls 3.4.11 → 3.4.12

raw patch · 3 files changed

+19/−3 lines, 3 files

Files

ChangeLog.md view
@@ -1,5 +1,10 @@ # ChangeLog +## 3.4.12++* Rethrowing asynchronous exceptions+  [#1013](https://github.com/yesodweb/wai/pull/1013)+ ## 3.4.11  * Removing `unliftio`.
Network/Wai/Handler/WarpTLS.hs view
@@ -335,6 +335,17 @@  ---------------------------------------------------------------- +isAsyncException :: Exception e => e -> Bool+isAsyncException e =+    case E.fromException (E.toException e) of+        Just (E.SomeAsyncException _) -> True+        Nothing -> False++throughAsync :: IO a -> SomeException -> IO a+throughAsync action (SomeException e)+  | isAsyncException e = E.throwIO e+  | otherwise          = action+ httpOverTls     :: TLS.TLSParams params     => TLSSettings@@ -360,13 +371,13 @@         case mconn of           Nothing -> throwIO IncompleteHeaders           Just conn -> return conn-    wrappedRecvN recvN n = handle (\(SomeException _) -> mempty) $ recvN n+    wrappedRecvN recvN n = handle (throughAsync (return "")) $ recvN n     backend recvN =         TLS.Backend             { TLS.backendFlush = return () #if MIN_VERSION_network(3,1,1)             , TLS.backendClose =-                gracefulClose s 5000 `E.catch` \(SomeException _) -> return ()+                gracefulClose s 5000 `E.catch` throughAsync (return ()) #else             , TLS.backendClose = close s #endif
warp-tls.cabal view
@@ -1,5 +1,5 @@ Name:                warp-tls-Version:             3.4.11+Version:             3.4.12 Synopsis:            HTTP over TLS support for Warp via the TLS package License:             MIT License-file:        LICENSE