Skip to content

Commit c2752be

Browse files
jstnhuangchris-smith
authored andcommitted
Fixed how GoalHandle's status field is accessed in ActionServer. (#91)
* Fixed how GoalHandle's status field is accessed in ActionServer. * Provide full status message to publishResult.
1 parent d734708 commit c2752be

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/actions/ActionServer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ class ActionServer extends EventEmitter {
9494
let handle = this._getGoalHandle(newGoalId);
9595

9696
if (handle) {
97-
if (handle.status === GoalStatuses.RECALLING) {
98-
handle.status = GoalStatuses.RECALLED;
99-
this.publishResult(status.status, this._createMessage('result'));
97+
if (handle._status.status === GoalStatuses.RECALLING) {
98+
handle._status.status = GoalStatuses.RECALLED;
99+
this.publishResult(handle._status, this._createMessage('result'));
100100
}
101101

102102
handle._destructionTime = msg.goal_id.stamp;
@@ -134,7 +134,7 @@ class ActionServer extends EventEmitter {
134134
for (let i = 0, len = this._goalHandleList.length; i < len; ++i) {
135135
const handle = this._goalHandleList[i];
136136
const handleId = handle.id;
137-
const handleStamp = handle.status.goal_id.stamp;
137+
const handleStamp = handle._status.goal_id.stamp;
138138

139139
if (shouldCancelEverything ||
140140
cancelId === handleId ||

0 commit comments

Comments
 (0)