Skip to content

Commit

Permalink
With withManager
Browse files Browse the repository at this point in the history
This depends on kazu-yamamoto/http2#137.
Closes #190.
  • Loading branch information
edsko committed Jul 25, 2024
1 parent 4a04a91 commit 04d2ba2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ jobs:
echo "package grapesy" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
cat >> cabal.project <<EOF
constraints: network-control==0.1.2
constraints: network-control==0.1.3
allow-newer: proto-lens:base
allow-newer: proto-lens-runtime:base
Expand Down
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package grapesy
benchmarks: True
flags: +build-demo +build-stress-test +snappy

constraints: network-control==0.1.2
constraints: network-control==0.1.3

--
-- ghc 9.10
Expand Down
2 changes: 1 addition & 1 deletion cabal.project.ci
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package grapesy
flags: +build-demo +build-stress-test +snappy +strace
ghc-options: -Werror

constraints: network-control==0.1.2
constraints: network-control==0.1.3

--
-- ghc 9.10
Expand Down
4 changes: 2 additions & 2 deletions grapesy.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ library
, exceptions >= 0.10 && < 0.11
, hashable >= 1.3 && < 1.5
, http-types >= 0.12 && < 0.13
, http2 >= 5.3 && < 5.4
, http2 >= 5.3.1 && < 5.4
, http2-tls >= 0.4.1 && < 0.5
, lens >= 5.0 && < 5.4
, mtl >= 2.2 && < 2.4
Expand Down Expand Up @@ -333,7 +333,7 @@ test-suite test-grapesy
, containers >= 0.6 && < 0.8
, exceptions >= 0.10 && < 0.11
, http-types >= 0.12 && < 0.13
, http2 >= 5.3 && < 5.4
, http2 >= 5.3.1 && < 5.4
, lens >= 5.0 && < 5.4
, mtl >= 2.2 && < 2.4
, network >= 3.1 && < 3.3
Expand Down
6 changes: 1 addition & 5 deletions util/Network/GRPC/Util/HTTP2.hs
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,7 @@ withConfigForInsecure ::
-> (Server.Config -> IO a)
-> IO a
withConfigForInsecure sock k = do
-- TODO: <https://github.com/well-typed/grapesy/issues/190>
-- We should be using withManager instead.
bracket
(TimeManager.initialize (disableTimeout * 1_000_000))
(\_ -> return ()) $ \mgr -> do
TimeManager.withManager (disableTimeout * 1_000_000) $ \mgr -> do
-- @recv@ does not provide a way to deallocate a buffer pool, and
-- @http2-tls@ (in @freeServerConfig@) does not attempt to deallocate it.
-- We follow suit here.
Expand Down

0 comments on commit 04d2ba2

Please sign in to comment.