packages feed

snap-server 1.0.2.1 → 1.0.2.2

raw patch · 3 files changed

+11/−7 lines, 3 filesdep ~criteriondep ~time

Dependency ranges changed: criterion, time

Files

snap-server.cabal view
@@ -1,5 +1,5 @@ name:           snap-server-version:        1.0.2.1+version:        1.0.2.2 synopsis:       A web server for the Snap Framework description:   Snap is a simple and fast web development framework and server written in
src/Snap/Internal/Http/Server/Session.hs view
@@ -192,8 +192,10 @@             connClose <- newIORef False             newConn   <- newIORef True             let twiddleTimeout = unsafePerformIO $ do-                    th <- readMVar thMVar-                    return $ TM.modify th+                                   th <- readMVar thMVar+                                   return $! TM.modify th+            let cleanupTimeout = do th <- readMVar thMVar+                                    return $! TM.cancel th              let !psd = PerSessionData connClose                                       twiddleTimeout@@ -205,7 +207,9 @@                                       remotePort                                       readEnd                                       writeEnd-            restore (session psd) `E.finally` cleanup+            restore (session psd)+                `E.finally` cleanup+                `E.finally` cleanupTimeout      --------------------------------------------------------------------------     session psd = do
src/Snap/Internal/Http/Server/TimeoutManager.hs view
@@ -19,10 +19,10 @@ ------------------------------------------------------------------------------ import           Control.Exception                (evaluate, finally) import qualified Control.Exception                as E-import           Control.Monad                    (Monad ((>>=), return), mapM_, void, when)+import           Control.Monad                    (Monad (return, (>>=)), mapM_, void, when) import qualified Data.ByteString.Char8            as S import           Data.IORef                       (IORef, newIORef, readIORef, writeIORef)-import           Prelude                          (Bool, Double, IO, Int, Show (..), const, fromIntegral, max,  null, otherwise, round, ($), ($!), (+), (++), (-), (.), (<=), (==))+import           Prelude                          (Bool, Double, IO, Int, Show (..), const, fromIntegral, max, null, otherwise, round, ($), ($!), (+), (++), (-), (.), (<=), (==)) ------------------------------------------------------------------------------ import           Control.Concurrent               (MVar, newEmptyMVar, putMVar, readMVar, takeMVar, tryPutMVar) ------------------------------------------------------------------------------@@ -172,8 +172,8 @@ -- | Cancel a timeout. cancel :: TimeoutThread -> IO () cancel h = E.uninterruptibleMask_ $ do-    T.cancel $ _thread h     writeIORef (_state h) canceled+    T.cancel $ _thread h {-# INLINE cancel #-}