packages feed

warp-tls 3.0.4 → 3.0.4.1

raw patch · 3 files changed

+8/−4 lines, 3 files

Files

ChangeLog.md view
@@ -1,3 +1,7 @@+## 3.0.4.1++* Fix for leaked FDs [#378](https://github.com/yesodweb/wai/issues/378)+ ## 3.0.4  * Replace `acceptSafe` with `accept`, see [#361](https://github.com/yesodweb/wai/issues/361)
Network/Wai/Handler/WarpTLS.hs view
@@ -36,7 +36,7 @@ import Network.Socket (Socket, sClose, withSocketsDo, SockAddr, accept) import qualified Data.ByteString as S import qualified Data.ByteString.Lazy as L-import Control.Exception (bracket, finally, handle, fromException, try, IOException)+import Control.Exception (bracket, finally, handle, fromException, try, IOException, onException) import qualified Network.TLS.Extra as TLSExtra import qualified Data.ByteString as B import Data.Streaming.Network (bindPortTCP, safeRecv)@@ -257,10 +257,10 @@ mkConn tlsset s params = do     firstBS <- safeRecv s 4096     cachedRef <- I.newIORef firstBS-    if not (B.null firstBS) && B.head firstBS == 0x16 then+    (if not (B.null firstBS) && B.head firstBS == 0x16 then         httpOverTls tlsset s cachedRef params       else-        plainHTTP tlsset s cachedRef+        plainHTTP tlsset s cachedRef) `onException` sClose s  ---------------------------------------------------------------- 
warp-tls.cabal view
@@ -1,5 +1,5 @@ Name:                warp-tls-Version:             3.0.4+Version:             3.0.4.1 Synopsis:            HTTP over SSL/TLS support for Warp via the TLS package License:             MIT License-file:        LICENSE