@@ -57,27 +57,13 @@ runWebSockets opts req app _ conn = do
57 let pc = WS.PendingConnection
57 let pc = WS.PendingConnection
58 { WS.pendingOptions = opts
58 { WS.pendingOptions = opts
59 , WS.pendingRequest = req
59 , WS.pendingRequest = req
60− , WS.pendingOnAccept = forkPingThread
60+ , WS.pendingOnAccept = \_ -> return ()
61 , WS.pendingIn = is
61 , WS.pendingIn = is
62 , WS.pendingOut = os
62 , WS.pendingOut = os
65 liftIO $ app pc
65 liftIO $ app pc
67−--------------------------------------------------------------------------------
68−-- | Start a ping thread in the background
69−forkPingThread :: WS.Connection -> IO ()
70−forkPingThread conn = do
71− _ <- forkIO pingThread
74− pingThread = handle ignore $ forever $ do
75− WS.sendPing conn (BC.pack "ping")
76− threadDelay $ 30 * 1000 * 1000
78− ignore :: SomeException -> IO ()
81------------------------------------------------------------------------------
67------------------------------------------------------------------------------
82-- | Converts a 'Connection' to an 'InputStream' \/ 'OutputStream' pair. Note that,
68-- | Converts a 'Connection' to an 'InputStream' \/ 'OutputStream' pair. Note that,
83-- as is usually the case in @io-streams@, writing a 'Nothing' to the generated
69-- as is usually the case in @io-streams@, writing a 'Nothing' to the generated