Skip to content

Commit 778bdfd

Browse files
bklaricowickstrom
authored andcommitted
runServer now uses runAff instead of launchAff.
1 parent 6443023 commit 778bdfd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Hyper/Node/Server.purs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import Node.Buffer as Buffer
1717
import Node.HTTP as HTTP
1818
import Node.Stream as Stream
1919
import Control.IxMonad (ipure, (:*>), (:>>=))
20-
import Control.Monad.Aff (Aff, launchAff, makeAff)
20+
import Control.Monad.Aff (Aff, launchAff, makeAff, runAff)
2121
import Control.Monad.Aff.AVar (putVar, takeVar, modifyVar, makeVar', AVAR, makeVar)
2222
import Control.Monad.Aff.Class (class MonadAff, liftAff)
2323
import Control.Monad.Eff (Eff)
@@ -250,8 +250,7 @@ runServer' options components runM middleware = do
250250
, response: HttpResponse response
251251
, components: components
252252
}
253-
in catchException options.onRequestError (void (launchAff (runM (evalMiddleware middleware conn))))
254-
253+
in conn # evalMiddleware middleware # runM # runAff options.onRequestError (const $ pure unit) # void
255254

256255
runServer
257256
:: forall e c c'.

0 commit comments

Comments
 (0)