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  30f087131a25d32a361464f03c1c3a30b1811372 (commit)
      from  be081833a391d063c1ef99637281671a98c73eb1 (commit)


Summary of changes:
 src/Snap/Internal/Http/Server/LibevBackend.hs |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 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 30f087131a25d32a361464f03c1c3a30b1811372
Author: Aycan iRiCAN <[email protected]>
Date:   Wed Jul 14 17:24:47 2010 +0300

    set repeat in timerCallback using evTimerSetRepeat.

diff --git a/src/Snap/Internal/Http/Server/LibevBackend.hs 
b/src/Snap/Internal/Http/Server/LibevBackend.hs
index 212e823..c243e17 100644
--- a/src/Snap/Internal/Http/Server/LibevBackend.hs
+++ b/src/Snap/Internal/Http/Server/LibevBackend.hs
@@ -376,10 +376,9 @@ timerCallback loop tmr ioref tmv _ _ _ = do
           tid <- readMVar tmv
           throwTo tid TimeoutException
 
-      else do    -- re-arm the timer
-          -- fixme: should set repeat here, have to wait for an hlibev patch to
-          -- do it
-          evTimerAgain loop tmr
+      else do
+        evTimerSetRepeat tmr $ fromRational . toRational $ (whenToDie - now)
+        evTimerAgain loop tmr
 
 
 freeConnection :: Connection -> IO ()
@@ -512,9 +511,9 @@ withConnection backend cpu proc = go
         now         <- getCurrentDateTime
         timeoutTime <- newIORef $ now + 20
         tcb         <- mkTimerCallback $ timerCallback lp
-                                                       tmr
-                                                       timeoutTime
-                                                       thrmv
+                                                      tmr
+                                                      timeoutTime
+                                                      thrmv
         -- 20 second timeout
         evTimerInit tmr tcb 0 20.0
 
-----------------------------------------------------------------------


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

Reply via email to