Titanium JIRA Archive
Appcelerator Daemon (DAEMON)

[DAEMON-266] appcd exec doesn't properly handle streamed responses

GitHub Issuen/a
TypeBug
PriorityHigh
StatusResolved
ResolutionFixed
Resolution Date2019-03-13T20:46:31.000+0000
Affected Version/sn/a
Fix Version/sAppc Daemon 2.0.0
Componentsappcd
Labelsn/a
ReporterChris Barber
AssigneeChris Barber
Created2018-10-25T13:22:51.000+0000
Updated2019-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.

Comments

  1. Chris Barber 2018-10-25

    PR: https://github.com/appcelerator/appc-daemon/pull/341 To test, run: appcd exec /appcd/status/system/memory and observe 1 response and exit. appcd exec /appcd/status/system/memory --subscribe and 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.

JSON Source