http2-tls 0.5.7 → 0.5.8
raw patch · 3 files changed
+17/−3 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +5/−0
- Network/HTTP2/TLS/Server.hs +11/−2
- http2-tls.cabal +1/−1
ChangeLog.md view
@@ -1,6 +1,11 @@ # Revision history for http2-tls +## 0.5.8++* Send close_notify after an HTTP/2 connection the server ends.+ [#28](https://github.com/kazu-yamamoto/http2-tls/pull/28)+ ## 0.5.7 * A server can be stopped through `settingsInstallShutdownHandler`: the
Network/HTTP2/TLS/Server.hs view
@@ -58,6 +58,7 @@ import Control.Concurrent.STM (STM, atomically, check, newTVarIO, readTVar, retry, writeTVar) import qualified Control.Exception as E import Data.ByteString (ByteString)+import Network.HTTP2.Client (HTTP2Error (..)) import Network.HTTP2.Server ( Server, connectionWindowSize,@@ -193,7 +194,7 @@ E.bracket (allocConfigForServer settings0 mgr send sendWith recv recvWith mySockAddr peerSockAddr) freeConfigForServer- (\conf -> H2Server.runWith goAway sconf conf server)+ (\conf -> endedNormally $ H2Server.runWith goAway sconf conf server) where sconf = defaultServerConfig@@ -231,7 +232,7 @@ E.bracket (allocConfigForServer settings0 mgr send sendWith recv recvWith mySockAddr peerSockAddr) freeConfigForServer- (\conf -> H2I.runIOWith goAway sconf conf action)+ (\conf -> endedNormally $ H2I.runIOWith goAway sconf conf action) where sconf = defaultServerConfig@@ -283,6 +284,14 @@ stop >> atomically (writeTVar var True) return (settings{settingsInstallShutdownHandler = install}, readTVar var >>= check)++-- | http2 ends a connection which has run its course with+-- 'ConnectionIsClosed'. Taken as returning, so that close_notify is+-- sent after it, as for any other action.+endedNormally :: IO () -> IO ()+endedNormally = E.handle $ \e -> case e of+ ConnectionIsClosed -> return ()+ _ -> E.throwIO e ----------------------------------------------------------------
http2-tls.cabal view
@@ -1,6 +1,6 @@ cabal-version: >=1.10 name: http2-tls-version: 0.5.7+version: 0.5.8 license: BSD3 license-file: LICENSE maintainer: Kazu Yamamoto <kazu@iij.ad.jp>