summaryrefslogtreecommitdiffhomepage
path: root/WebSockets.hs
diff options
context:
space:
mode:
Diffstat (limited to 'WebSockets.hs')
-rw-r--r--WebSockets.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/WebSockets.hs b/WebSockets.hs
index c463c28..4b05fdb 100644
--- a/WebSockets.hs
+++ b/WebSockets.hs
@@ -55,6 +55,8 @@ clientApp
-> (TChan sent -> TChan received -> SessionID -> IO a)
-> ClientApp a
clientApp mode mksent filterreceived a conn = do
+ -- Ping every 30 seconds to avoid timeouts caused by proxies etc.
+ forkPingThread conn 30
_v <- negotiateWireVersion conn
sendBinaryData conn (SelectMode ClientSends mode)
r <- receiveData conn