Skip to content

Commit

Permalink
using concurrently_ for servers
Browse files Browse the repository at this point in the history
  • Loading branch information
kazu-yamamoto committed Apr 6, 2023
1 parent 96e6963 commit b25867f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Network/HTTP2/Server/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

module Network.HTTP2.Server.Run where

import UnliftIO.Async (race_)
import UnliftIO.Async (concurrently_)
import qualified UnliftIO.Exception as E

import Imports
Expand Down Expand Up @@ -33,7 +33,7 @@ run conf@Config{..} server = do
replicateM_ 3 $ spawnAction mgr
let runReceiver = frameReceiver ctx conf
runSender = frameSender ctx conf mgr
race_ runReceiver runSender `E.finally` stop mgr
concurrently_ runReceiver runSender `E.finally` stop mgr
where
checkPreface = do
preface <- confReadN connectionPrefaceLength
Expand Down

0 comments on commit b25867f

Please sign in to comment.