Skip to content

Commit 6b47c4c

Browse files
committed
Reset state
1 parent 368155c commit 6b47c4c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jderobot-commsmanager",
3-
"version": "1.0.10",
3+
"version": "1.0.11",
44
"main": "dist/main.js",
55
"typings": "dist/index.d.ts",
66
"scripts": {

src/components/CommsManager.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ export default class CommsManager {
2525
// Private constructor to only allow single instatiation
2626
private constructor() {
2727
this.ws = new WebSocket(CommsManager.adress);
28+
this.setManagerState({
29+
id: "",
30+
command: "",
31+
data: { state: "idle" },
32+
});
2833
this.subscribe(events.STATE_CHANGED, this.setManagerState);
2934
this.subscribeOnce(events.INTROSPECTION, this.setHostData);
3035

0 commit comments

Comments
 (0)