This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "snap-core".

The branch, master has been updated
       via  b2f3c4fd9b751c7a7ff6eb338c0e9ce9147461e3 (commit)
      from  67cc9c6c975918f224b08f7ae01362f445cd3fe2 (commit)


Summary of changes:
 snap-core.cabal      |    2 +-
 src/Snap/Iteratee.hs |    6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b2f3c4fd9b751c7a7ff6eb338c0e9ce9147461e3
Author: Gregory Collins <[email protected]>
Date:   Fri Feb 11 17:28:56 2011 -0800

    Another fix for the MonadCatchIO instance re: divergent iteratees

diff --git a/snap-core.cabal b/snap-core.cabal
index 7aaed9b..f2f82fb 100644
--- a/snap-core.cabal
+++ b/snap-core.cabal
@@ -1,5 +1,5 @@
 name:           snap-core
-version:        0.4.0.1
+version:        0.4.0.2
 synopsis:       Snap: A Haskell Web Framework (Core)
 
 description:
diff --git a/src/Snap/Iteratee.hs b/src/Snap/Iteratee.hs
index 7891004..ae87d93 100644
--- a/src/Snap/Iteratee.hs
+++ b/src/Snap/Iteratee.hs
@@ -137,7 +137,11 @@ instance (Functor m, MonadCatchIO m) =>
     catch m handler = Iteratee $ do
         ee <- try $ runIteratee (m `catchError` h)
         case ee of
-          (Left e)  -> runIteratee (handler e)
+          -- if we got an async exception here then the iteratee workflow is
+          -- all messed up, we have no reasonable choice but to send EOF to the
+          -- handler, because the unparsed input got lost. If the enumerator
+          -- sends more chunks we can possibly recover later.
+          (Left e)  -> runIteratee (enumEOF $$ handler e)
           (Right v) -> step v
       where
         step (Continue k)  = return $ Continue (\s -> k s `catch` handler)
-----------------------------------------------------------------------


hooks/post-receive
-- 
snap-core
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap

Reply via email to