We want to be able to kill threads if they don't respond to pings, and run onDroppedConnection. Without this, the Linux backend can end up with an unbounded number of left over devices created in /dev/input.
websockets recently added serverRequirePong (jaspervdj/websockets#199), which handles some of this logic, though it doesn't allow us to specify an action to run on timeout (EDIT: that might be fine - assuming it just causes an exception to be thrown, we'll end up running onDroppedConnection anyway).
Another issue is that servant-websockets doesn't allow us to get at ServerOptions or ConnectionOptions (EDIT: not true, we actually now do in 2d3ea6b).`
We could manually implement a workaround like the one discussed here, though it's pretty ugly.
We want to be able to kill threads if they don't respond to pings, and run
onDroppedConnection. Without this, the Linux backend can end up with an unbounded number of left over devices created in/dev/input.websocketsrecently added serverRequirePong (jaspervdj/websockets#199), which handles some of this logic, though it doesn't allow us to specify an action to run on timeout (EDIT: that might be fine - assuming it just causes an exception to be thrown, we'll end up runningonDroppedConnectionanyway).Another issue is that
servant-websocketsdoesn't allow us to get atServerOptionsor.`ConnectionOptions(EDIT: not true, we actually now do in 2d3ea6b)We could manually implement a workaround like the one discussed here, though it's pretty ugly.