packages feed

wai-websockets 1.3.2.0 → 1.3.2.1

raw patch · 2 files changed

+2/−19 lines, 2 files

Files

Network/Wai/Handler/WebSockets.hs view
@@ -4,10 +4,7 @@     , interceptWith     ) where -import              Control.Monad                   (forever) import              Control.Monad.IO.Class          (liftIO)-import              Control.Concurrent              (forkIO, threadDelay)-import              Control.Exception               (SomeException (..), handle) import              Blaze.ByteString.Builder        (Builder) import qualified    Blaze.ByteString.Builder        as Builder import              Data.ByteString                 (ByteString)@@ -57,26 +54,12 @@     let pc = WS.PendingConnection                  { WS.pendingOptions     = opts                 , WS.pendingRequest     = req-                , WS.pendingOnAccept    = forkPingThread+                , WS.pendingOnAccept    = \_ -> return ()                 , WS.pendingIn          = is                 , WS.pendingOut         = os                 }      liftIO $ app pc------------------------------------------------------------------------------------- | Start a ping thread in the background-forkPingThread :: WS.Connection -> IO ()-forkPingThread conn = do-    _ <- forkIO pingThread-    return ()-    where-        pingThread = handle ignore $ forever $ do-            WS.sendPing conn (BC.pack "ping")-            threadDelay $ 30 * 1000 * 1000--        ignore :: SomeException -> IO ()-        ignore _   = return ()  ------------------------------------------------------------------------------ -- | Converts a 'Connection' to an 'InputStream' \/ 'OutputStream' pair. Note that,
wai-websockets.cabal view
@@ -1,5 +1,5 @@ Name:                wai-websockets-Version:             1.3.2.0+Version:             1.3.2.1 Synopsis:            Provide a bridge betweeen WAI and the websockets package. License:             MIT License-file:        LICENSE