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-server".
The branch, master has been updated
via 9b077119d681c625c1af61993a58da57f7eff69f (commit)
from 3221916dc458aa76ad5137f4afa2ab7d55e1c9c2 (commit)
Summary of changes:
src/Snap/Internal/Http/Server/SimpleBackend.hs | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 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 9b077119d681c625c1af61993a58da57f7eff69f
Author: Gregory Collins <[email protected]>
Date: Sun Jun 6 16:48:44 2010 -0400
Sendfile timeout fix for simple backend
diff --git a/src/Snap/Internal/Http/Server/SimpleBackend.hs
b/src/Snap/Internal/Http/Server/SimpleBackend.hs
index 9ba4665..03a138c 100644
--- a/src/Snap/Internal/Http/Server/SimpleBackend.hs
+++ b/src/Snap/Internal/Http/Server/SimpleBackend.hs
@@ -88,7 +88,9 @@ name = "simple"
sendFile :: Connection -> FilePath -> IO ()
sendFile c fp = do
let s = _socket c
+ cancelTimeout c
SF.sendFile s fp
+ tickleTimeout c
bindIt :: ByteString -- ^ bind address, or \"*\" for all
@@ -287,6 +289,16 @@ tickleTimeout conn = do
tedits = _timeoutEdits $ _backend conn
+cancelTimeout :: Connection -> IO ()
+cancelTimeout conn = do
+ tid <- readMVar $ _connTid conn
+
+ atomicModifyIORef tedits $ \es -> (D.snoc es (PSQ.delete tid), ())
+
+ where
+ tedits = _timeoutEdits $ _backend conn
+
+
timeoutRecv :: Connection -> Int -> IO ByteString
timeoutRecv conn n = do
let sock = _socket conn
-----------------------------------------------------------------------
hooks/post-receive
--
snap-server
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap