packages feed

ngx-export 1.7.2 → 1.7.3

raw patch · 3 files changed

+34/−3 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Changelog.md view
@@ -1,3 +1,7 @@+### 1.7.3++- Further fixes for inactive shared services waiting on file-locks.+ ### 1.7.2  - More robust masking in async handlers. As this uses function *interruptible*
NgxExport.hs view
@@ -62,7 +62,11 @@                  ,Foreign.C.CUInt (..)                  ) where +#if MIN_VERSION_template_haskell(2,12,0) import           Language.Haskell.TH hiding (interruptible)+#else+import           Language.Haskell.TH+#endif import           Foreign.C import           Foreign.Ptr import           Foreign.StablePtr@@ -83,6 +87,7 @@ import           Control.Exception hiding (Handler) import           GHC.IO.Exception (ioe_errno) import           GHC.IO.Device (SeekMode (..))+import           Control.Concurrent import           Control.Concurrent.Async import qualified Data.ByteString as B import qualified Data.ByteString.Unsafe as B@@ -824,8 +829,30 @@                                         return (True, False)                                 )                             `catches`-                            [E.Handler $-                                return . (, False) . not . isEINTR+                            [E.Handler $ \e ->+                                if isEINTR e+                                    then return (False, False)+                                    else do+                                        -- wait some time to avoid fastly+                                        -- repeated calls; threadDelay is+                                        -- interruptible even in exception+                                        -- handlers+                                        exiting <-+                                            (threadDelay 500000 >>+                                                return False+                                            )+                                            `catches`+                                            [E.Handler $ return .+                                                (== WorkerProcessIsExiting)+                                            ,E.Handler+                                                (const $ return False ::+                                                    SomeException -> IO Bool+                                                )+                                            ]+                                        if exiting+                                            then return (True, True)+                                            else throwIO $+                                                ServiceSomeInterrupt $ show e                             ,E.Handler $                                 return . (True, ) . (== WorkerProcessIsExiting)                             ,E.Handler
ngx-export.cabal view
@@ -1,5 +1,5 @@ name:                       ngx-export-version:                    1.7.2+version:                    1.7.3 synopsis:                   Helper module for Nginx haskell module description:                Helper module for         <http://github.com/lyokha/nginx-haskell-module Nginx haskell module>.