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 24, 2024
1 parent 249c6d0 commit 12a267f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,15 @@ 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
source-repository-package
type: git
location: https://github.com/edsko/http2.git
tag: e753c9ff2df0a0a8cb3344d5d504dd635a90523e
package grapesy
tests: True
benchmarks: True
Expand Down
7 changes: 6 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ package grapesy
benchmarks: True
flags: +build-demo +build-stress-test +snappy

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

source-repository-package
type: git
location: https://github.com/edsko/http2.git
tag: e753c9ff2df0a0a8cb3344d5d504dd635a90523e

--
-- ghc 9.10
Expand Down
7 changes: 6 additions & 1 deletion cabal.project.ci
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ 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

source-repository-package
type: git
location: https://github.com/edsko/http2.git
tag: e753c9ff2df0a0a8cb3344d5d504dd635a90523e

--
-- ghc 9.10
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 12a267f

Please sign in to comment.