JSON message parsing for contract control messages. (#166)

This commit is contained in:
Ravin Perera
2020-11-26 09:31:39 +05:30
committed by GitHub
parent c41b37fd52
commit bb223b1e3a
11 changed files with 284 additions and 146 deletions

View File

@@ -40,7 +40,7 @@ class HotPocketContract {
}
#terminate = () => {
this.#controlChannel.send("Terminated")
this.#controlChannel.send(JSON.stringify({ type: "contract_end" }));
this.#controlChannel.close();
}
}