@@ -57,27 +57,13 @@ runWebSockets opts req app _ conn = do
5757 let pc = WS.PendingConnection
5858 { WS.pendingOptions = opts
5959 , WS.pendingRequest = req
60− , WS.pendingOnAccept = forkPingThread
60+ , WS.pendingOnAccept = \_ -> return ()
6161 , WS.pendingIn = is
6262 , WS.pendingOut = os
6363 }
6464
6565 liftIO $ app pc
6666
67−--------------------------------------------------------------------------------
68−-- | Start a ping thread in the background
69−forkPingThread :: WS.Connection -> IO ()
70−forkPingThread conn = do
71− _ <- forkIO pingThread
72− return ()
73− where
74− pingThread = handle ignore $ forever $ do
75− WS.sendPing conn (BC.pack "ping")
76− threadDelay $ 30 * 1000 * 1000
77−
78− ignore :: SomeException -> IO ()
79− ignore _ = return ()
80−
8167------------------------------------------------------------------------------
8268-- | Converts a 'Connection' to an 'InputStream' \/ 'OutputStream' pair. Note that,
8369-- as is usually the case in @io-streams@, writing a 'Nothing' to the generated