Merge pull request #1700 from Disco-Dave/yesod-websockets/remove-use-of-forkPingThread
Remove use of deprecated forkPingThread
This commit is contained in:
commit
710d40d253
@ -1,3 +1,6 @@
|
|||||||
|
## 0.3.0.3
|
||||||
|
* Removed the use of the deprecated forkPingThread and replaced it with the recommended withPingThread. [#1700](https://github.com/yesodweb/yesod/pull/1700)
|
||||||
|
|
||||||
## 0.3.0.2
|
## 0.3.0.2
|
||||||
|
|
||||||
* `sendClose` and `sendPing` correctly find the `Connection` from `WebSocketsT`
|
* `sendClose` and `sendPing` correctly find the `Connection` from `WebSocketsT`
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE FlexibleContexts #-}
|
{-# LANGUAGE FlexibleContexts #-}
|
||||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||||
module Yesod.WebSockets
|
module Yesod.WebSockets
|
||||||
@ -117,8 +118,14 @@ webSocketsOptionsWith wsConnOpts buildAr inner = do
|
|||||||
rhead
|
rhead
|
||||||
(\pconn -> do
|
(\pconn -> do
|
||||||
conn <- WS.acceptRequestWith pconn ar
|
conn <- WS.acceptRequestWith pconn ar
|
||||||
|
let app = runInIO $ runReaderT inner conn
|
||||||
|
#if MIN_VERSION_websockets(0,12,6)
|
||||||
|
WS.withPingThread conn 30 (pure ()) $ app
|
||||||
|
#else
|
||||||
WS.forkPingThread conn 30
|
WS.forkPingThread conn 30
|
||||||
runInIO $ runReaderT inner conn)
|
app
|
||||||
|
#endif
|
||||||
|
)
|
||||||
src
|
src
|
||||||
sink
|
sink
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: yesod-websockets
|
name: yesod-websockets
|
||||||
version: 0.3.0.2
|
version: 0.3.0.3
|
||||||
synopsis: WebSockets support for Yesod
|
synopsis: WebSockets support for Yesod
|
||||||
homepage: https://github.com/yesodweb/yesod
|
homepage: https://github.com/yesodweb/yesod
|
||||||
license: MIT
|
license: MIT
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user