[DAEMON-266] appcd exec doesn't properly handle streamed responses
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Resolved |
| Resolution | Fixed |
| Resolution Date | 2019-03-13T20:46:31.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Appc Daemon 2.0.0 |
| Components | appcd |
| Labels | n/a |
| Reporter | Chris Barber |
| Assignee | Chris Barber |
| Created | 2018-10-25T13:22:51.000+0000 |
| Updated | 2019-03-13T20:46:31.000+0000 |
Description
There is an issue where non-subscription based responses are not being terminated when finished. The problem stems from the
WebSocketSession not properly sending a fin: true on the last message and the client not handling the last message in the request.
PR: https://github.com/appcelerator/appc-daemon/pull/341 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.