[DAEMON-266] appcd exec doesn't properly handle streamed responses
|Fix Version/s||Appc Daemon 2.0.0|
DescriptionThere is an issue where non-subscription based responses are not being terminated when finished. The problem stems from the
WebSocketSessionnot properly sending a
fin: trueon the last message and the client not handling the last message in the request.
- Chris Barber 2018-10-25
To test, run:
appcd exec /appcd/status/system/memoryand observe 1 response and exit.
appcd exec /appcd/status/system/memory --subscribeand observer several responses and no exit. Ctrl-C to quit. To fully test this, you should also test a plugin with a service that returns a non-pubsub streamed response (i.e. a plugin that spawns something that outputs a chunk of output). I was testing a service that subprocessed another Node script that wrote a bunch of stuff to stdout, which in turn was written to the response stream.