[DAEMON-88] appcd-core: Add heartbeat to WebsocketSession
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | Low |
| Status | Resolved |
| Resolution | Won't Fix |
| Resolution Date | 2017-12-01T18:26:25.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Appc Daemon 1.0.0 |
| Components | appcd-core |
| Labels | n/a |
| Reporter | Chris Barber |
| Assignee | Chris Barber |
| Created | 2017-05-23T20:32:02.000+0000 |
| Updated | 2017-12-01T18:26:25.000+0000 |
Description
Currently there is no mechanism to detect if the Websocket client is borked. This can be accomplished using a ping/pong heartbeat.
Clients opt-in by setting the
x-heartbeat HTTP header. When set, the WebsocketSession will send a "ping" event every 30 seconds to the client. The client has 5 seconds to respond with a "pong", otherwise the connection is closed by the server.
We can't think of a good reason to implement this.