on master help sign in
Longer ping interval
commit241972f3b2ab9d22efd959c0e9684eccb3d6e032 authorMichael Snoyman <michael@snoyman.com> dateTue 24 May 2011, 10:50 (15 years ago) parent735f7b9
1 file changed+2−2
Network/Wai/Handler/Launch.hs+2−2
Network/Wai/Handler/Launch.hs+2−2
@@ -31,7 +31,7 @@ ping var app req
3131 case lookup "content-type" headers of
3232 Just ct
3333 | "text/html" `S.isPrefixOf` ct -> do
34− enumList 1 [fromByteString "<script>setInterval(function(){var x;if(window.XMLHttpRequest){x=new XMLHttpRequest();}else{x=new ActiveXObject(\"Microsoft.XMLHTTP\");}x.open(\"GET\",\"/_ping\",false);x.send();},1000)</script>"] $$ f status headers
34+ enumList 1 [fromByteString "<script>setInterval(function(){var x;if(window.XMLHttpRequest){x=new XMLHttpRequest();}else{x=new ActiveXObject(\"Microsoft.XMLHTTP\");}x.open(\"GET\",\"/_ping\",false);x.send();},60000)</script>"] $$ f status headers
3535 _ -> f status headers
3636
3737#if WINDOWS
@@ -54,7 +54,7 @@ run app = do
5454
5555loop :: IORef Bool -> IO ()
5656loop x = do
57− let seconds = 2
57+ let seconds = 120
5858 threadDelay $ 1000000 * seconds
5959 b <- readIORef x
6060 if b