packages feed

ngx-export 1.2.1 → 1.2.2

raw patch · 3 files changed

+17/−10 lines, 3 files

Files

Changelog.md view
@@ -1,3 +1,7 @@+### 1.2.2++- Returning a special error code (*2*) on exception *ServiceHookInterrupt*.+ ### 1.2.1  - Bugfix: put *unsigned* integers in event channels (important for *eventfd*).
NgxExport.hs view
@@ -362,6 +362,12 @@         poke (castPtr p) n         poke (plusPtr p $ alignment x) s +data ServiceHookInterrupt = ServiceHookInterrupt++instance Exception ServiceHookInterrupt+instance Show ServiceHookInterrupt where+    show = const "Service was interrupted by a service hook"+ safeMallocBytes :: Int -> IO (Ptr a) safeMallocBytes =     flip catchIOError (const $ return nullPtr) . mallocBytes@@ -464,9 +470,12 @@     IO (L.ByteString, (CUInt, Bool)) safeYYHandler = handle $ \e ->     return (C8L.pack $ show e,-            (1, case asyncExceptionFromException e of-                    Nothing -> False-                    Just ae -> ae == ThreadKilled+            (case fromException e of+                Just ServiceHookInterrupt -> 2+                _ -> 1+            ,case asyncExceptionFromException e of+                Just ThreadKilled -> True+                _ -> False             )            ) {-# INLINE safeYYHandler #-}@@ -739,12 +748,6 @@     StablePtr (Async ()) -> IO () ngxExportTerminateTask = deRefStablePtr >=>     cancel--data ServiceHookInterrupt = ServiceHookInterrupt--instance Exception ServiceHookInterrupt-instance Show ServiceHookInterrupt where-    show = const "Service was interrupted by a service hook"  foreign export ccall ngxExportServiceHookInterrupt ::     StablePtr (Async ()) -> IO ()
ngx-export.cabal view
@@ -1,5 +1,5 @@ name:                       ngx-export-version:                    1.2.1+version:                    1.2.2 synopsis:                   Helper module for Nginx haskell module description:                Helper module for         <http://github.com/lyokha/nginx-haskell-module Nginx haskell module>