on master help sign in
adding comments for #708.
commit5ae69470419800479273119cfe966642c58ec6d0 authorKazu Yamamoto <kazu@iij.ad.jp> dateThu 30 Aug 2018, 12:43 (8 years ago) parent279ede5
1 file changed+5
warp/Network/Wai/Handler/Warp/Run.hs+5
warp/Network/Wai/Handler/Warp/Run.hs+5
@@ -211,7 +211,12 @@ acceptConnection set getConnMaker app counter ii0 = do
211211 -- First mask all exceptions in acceptLoop. This is necessary to
212212 -- ensure that no async exception is throw between the call to
213213 -- acceptNewConnection and the registering of connClose.
214+ --
215+ -- acceptLoop can be broken by closing the listing socket.
214216 void $ mask_ acceptLoop
217+ -- In some cases, we want to stop Warp here without graceful shutdown.
218+ -- So, async exceptions are allowed here.
219+ -- That's why `finally` is not used.
215220 gracefulShutdown set counter
216221 where
217222 acceptLoop = do