Stream: hapi
Topic: websocket timeout
Patrick Werner (Oct 19 2020 at 16:12):
i'm currently playing around with hapis subscriptions (websocket).
I couldn't find any ping/pong or heartbeat function in hapi, so idle websockets will timeout.
Patrick Werner (Oct 19 2020 at 16:13):
I want to prevent the timeout via ping/pong
Patrick Werner (Oct 19 2020 at 16:13):
Did i miss something? Would you accept a PR adding this @James Agnew ?
Patrick Werner (Oct 20 2020 at 14:45):
I found the ca.uhn.fhir.jpa.subscription.SocketImplementation class in the hapi tests, which just sends "keep alive" as a text message.
Patrick Werner (Oct 20 2020 at 14:47):
Checked the Implementation of the WS in hapi, there are no ping frames sent out.
Patrick Werner (Oct 20 2020 at 14:48):
Question to me is: what would be better: adding "keep alive" or sending out ping frames?
Patrick Werner (Oct 20 2020 at 14:49):
I also like the idea of the client being able to check the connection with Ping/Pong
Patrick Werner (Oct 20 2020 at 15:05):
to me this would lead to two aspects to implement:
- an (optional) Ping from Server -> Client, (Pong response by the client optional)
- hapi websocket backend responds with PONG to a PING frame
Last updated: Apr 12 2022 at 19:14 UTC