We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents aa2f47a + 314aa12 commit 59864ddCopy full SHA for 59864dd
1 file changed
src/Happstack/Server/Internal/Listen.hs
@@ -1,6 +1,7 @@
1
{-# LANGUAGE BangPatterns, CPP, ScopedTypeVariables #-}
2
module Happstack.Server.Internal.Listen(listen, listen',listenOn,listenOnIPv4) where
3
4
+import Data.Maybe (isNothing)
5
import Happstack.Server.Internal.Types (Conf(..), Request, Response)
6
import Happstack.Server.Internal.Handler (request)
7
import Happstack.Server.Internal.Socket (acceptLite)
@@ -118,7 +119,7 @@ listen' s conf hand = do
118
119
infi :: IO ()
120
infi = loop `catchSome` pe >> infi
121
- infi `finally` (Socket.close s >> forceTimeoutAll tm)
122
+ infi `finally` (Socket.close s >> when (isNothing $ threadGroup conf) (forceTimeoutAll tm))
123
124
{--
125
#ifndef mingw32_HOST_OS
0 commit comments