don't double-encode JSON
This commit is contained in:
parent
0a89138a79
commit
97a746c572
@ -79,10 +79,10 @@ class XhrListener {
|
||||
for (let client of c.clients) {
|
||||
let nonce: string = crypto.randomBytes(4).toString("hex");
|
||||
// TODO: verify the nonce against the received reply, which we currently ignore
|
||||
client.directMessage(JSON.stringify({
|
||||
client.directMessage({
|
||||
message_type: "broadcast",
|
||||
message: { event_type: event, seq_id: nonce, examId: archMsg.examId }
|
||||
}));
|
||||
});
|
||||
dmCount++;
|
||||
}
|
||||
// dmCount of 1 would be normal. more than 1 is odd, but not necessarily bad. 0 means Exam UI has gone away somehow.
|
||||
|
Loading…
x
Reference in New Issue
Block a user