Keep client connections alive using Network.WebSocket.forkPingThread.
This commit is contained in:
parent
9d748b2c35
commit
595ee70386
@ -53,6 +53,7 @@ webSockets inner = do
|
||||
(WaiWS.getRequestHead req)
|
||||
(\pconn -> do
|
||||
conn <- WS.acceptRequest pconn
|
||||
WS.forkPingThread conn 30
|
||||
runInIO $ runReaderT inner conn)
|
||||
src
|
||||
sink
|
||||
|
||||
@ -1,6 +1,3 @@
|
||||
-- Initial yesod-websockets.cabal generated by cabal init. For further
|
||||
-- documentation, see http://haskell.org/cabal/users-guide/
|
||||
|
||||
name: yesod-websockets
|
||||
version: 0.2.0
|
||||
synopsis: WebSockets support for Yesod
|
||||
@ -22,7 +19,7 @@ library
|
||||
, wai
|
||||
|
||||
, wai-websockets >= 2.1
|
||||
, websockets >= 0.8
|
||||
, websockets >= 0.9.2
|
||||
, transformers >= 0.2
|
||||
, yesod-core >= 1.4
|
||||
, monad-control >= 0.3
|
||||
|
||||
Loading…
Reference in New Issue
Block a user