packages feed

hedis 0.7.7 → 0.7.8

raw patch · 3 files changed

+19/−12 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

hedis.cabal view
@@ -1,5 +1,5 @@ name:               hedis-version:            0.7.7+version:            0.7.8 synopsis:     Client library for the Redis datastore: supports full command set,     pipelining.
src/Database/Redis/ProtocolPipelining.hs view
@@ -53,17 +53,17 @@ instance Exception ConnectionLostException  connect :: HostName -> PortID -> IO Connection-connect host port = do-  connHandle  <- connectTo host port-  hSetBinaryMode connHandle True-  connReplies <- newIORef []-  connPending <- newIORef []-  connPendingCnt <- newIORef 0-  let conn = Conn{..}-  rs <- connGetReplies conn-  writeIORef connReplies rs-  writeIORef connPending rs-  return conn+connect host port =+  bracketOnError (connectTo host port) hClose $ \connHandle -> do+    hSetBinaryMode connHandle True+    connReplies <- newIORef []+    connPending <- newIORef []+    connPendingCnt <- newIORef 0+    let conn = Conn{..}+    rs <- connGetReplies conn+    writeIORef connReplies rs+    writeIORef connPending rs+    return conn  disconnect :: Connection -> IO () disconnect Conn{..} = do
src/Database/Redis/PubSub.hs view
@@ -178,6 +178,13 @@ --      return $ unsubscribe [\"chat\"] --  @ --+-- It should be noted that Redis Pub\/Sub by its nature is asynchronous+-- so returning `unsubscribe` does not mean that callback won't be able+-- to receive any further messages. And to guarantee that you won't+-- won't process messages after unsubscription and won't unsubscribe+-- from the same channel more than once you need to use `IORef` or+-- something similar+-- pubSub     :: PubSub                 -- ^ Initial subscriptions.     -> (Message -> IO PubSub) -- ^ Callback function.