Use ping thread to keep websocket connection alive.

This commit is contained in:
Benjamin Summers 2019-12-19 04:43:40 -08:00
parent 3cc952824e
commit 8aa15e3b5c
2 changed files with 3 additions and 1 deletions

View File

@ -91,7 +91,8 @@ wsClient pax por = do
tid <- io $ async
$ WS.runClient "127.0.0.1" por (unpack pax)
$ runRIO env . wsConn "NOUNSERV (wsClie) " inp out
$ \con -> WS.withPingThread con 15 (pure ()) $
runRIO env (wsConn "NOUNSERV (wsClie) " inp out con)
pure $ Client con tid

View File

@ -11,6 +11,7 @@ extra-deps:
- lock-file-0.7.0.0@sha256:3ad84b5e454145e1d928063b56abb96db24a99a21b493989520e58fa0ab37b00
- urbit-hob-0.3.0@sha256:4871bd8ad01171ae5d4e50a344f4b8757e9eee80f62ab40a80f5311cd443b115
- para-1.1@sha256:a90eebb063ad70271e6e2a7f00a93e8e8f8b77273f100f39852fbf8301926f81
- websockets-0.12.6.1@sha256:3816e841d8102877817d24ef5c96288e79f1323434268b866aa40732cc86763f
nix:
packages: