summaryrefslogtreecommitdiff
path: root/fig-web/src/Fig/Web/Utils.hs
diff options
context:
space:
mode:
Diffstat (limited to 'fig-web/src/Fig/Web/Utils.hs')
-rw-r--r--fig-web/src/Fig/Web/Utils.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/fig-web/src/Fig/Web/Utils.hs b/fig-web/src/Fig/Web/Utils.hs
index 004ba5a..9076bd0 100644
--- a/fig-web/src/Fig/Web/Utils.hs
+++ b/fig-web/src/Fig/Web/Utils.hs
@@ -57,5 +57,5 @@ websocket :: ByteString -> (WS.Connection -> IO ()) -> Sc.ScottyM ()
websocket pat h = Sc.middleware $ Wai.WS.websocketsOr WS.defaultConnectionOptions handler
where
handler pending = if WS.requestPath (WS.pendingRequest pending) == pat
- then WS.acceptRequest pending >>= h
+ then WS.acceptRequest pending >>= \c -> WS.withPingThread c 30 (pure ()) $ h c
else WS.rejectRequest pending ""