Skip to content

Commit 0167af0

Browse files
committed
call onStatusChangeEmitter on status change
1 parent 474261f commit 0167af0

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/sessions/WebSocketSession/commands.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,18 @@ export class Command {
162162
/**
163163
* The status of the command.
164164
*/
165-
status: CommandStatus = "RUNNING";
165+
#status: CommandStatus = "RUNNING";
166+
167+
get status(): CommandStatus {
168+
return this.#status;
169+
}
170+
171+
set status(value: CommandStatus) {
172+
if (this.#status !== value) {
173+
this.#status = value;
174+
this.onStatusChangeEmitter.fire(this.#status);
175+
}
176+
}
166177

167178
/**
168179
* The command that was run

0 commit comments

Comments
 (0)