Browse Source

Merge pull request #112 from l29ah/newer-conduit

adapt to conduit-1.3
master
Philipp Balzarek 8 years ago committed by GitHub
parent
commit
501d61d7ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      pontarius-xmpp.cabal
  2. 4
      source/Network/Xmpp/Stream.hs

2
pontarius-xmpp.cabal

@ -39,7 +39,7 @@ Library
, base >4 && <5 , base >4 && <5
, base64-bytestring >=0.1.0.0 , base64-bytestring >=0.1.0.0
, binary >=0.4.1 , binary >=0.4.1
, conduit >=1.2.4.2 && < 1.3 , conduit >=1.3 && < 1.4
, containers >=0.4.0.0 , containers >=0.4.0.0
, crypto-api >=0.9 , crypto-api >=0.9
, crypto-random >=0.0.5 , crypto-random >=0.0.5

4
source/Network/Xmpp/Stream.hs

@ -283,7 +283,7 @@ logInput = go Nothing
bufferSrc :: Source (ErrorT XmppFailure IO) o bufferSrc :: Source (ErrorT XmppFailure IO) o
-> IO (ConduitM i o (ErrorT XmppFailure IO) ()) -> IO (ConduitM i o (ErrorT XmppFailure IO) ())
bufferSrc src = do bufferSrc src = do
ref <- newTMVarIO $ DCI.newResumableSource src ref <- newTMVarIO $ DCI.sealConduitT src
let go = do let go = do
dt <- liftIO $ Ex.bracketOnError dt <- liftIO $ Ex.bracketOnError
(atomically $ takeTMVar ref) (atomically $ takeTMVar ref)
@ -304,7 +304,7 @@ bufferSrc src = do
Right (Just d) -> yield d >> go Right (Just d) -> yield d >> go
return go return go
where where
zeroResumableSource = DCI.newResumableSource zeroSource zeroResumableSource = DCI.sealConduitT zeroSource
-- Reads the (partial) stream:stream and the server features from the stream. -- Reads the (partial) stream:stream and the server features from the stream.
-- Returns the (unvalidated) stream attributes, the unparsed element, or -- Returns the (unvalidated) stream attributes, the unparsed element, or

Loading…
Cancel
Save