Added 'invalid message' error.
This commit is contained in:
parent
6abfad391e
commit
dbe3cb97b2
5 changed files with 1988 additions and 1829 deletions
|
|
@ -49,7 +49,7 @@ export class Authentication {
|
|||
message.d == undefined || !("id" in message.d) ||
|
||||
typeof (message.d.id) !== "string" || !(message.d.id in Device.devices)
|
||||
) {
|
||||
this._socket.send(buildError(1, "Invalid packet. Missing ID"));
|
||||
this._socket.send(buildError(2, "Invalid packet. Missing ID"));
|
||||
this._socket.close();
|
||||
return;
|
||||
}
|
||||
|
|
@ -73,7 +73,7 @@ export class Authentication {
|
|||
) return;
|
||||
|
||||
if (this.signature !== parsed.d.signature) {
|
||||
this._socket.send(buildError(2, "Invalid signature."));
|
||||
this._socket.send(buildError(3, "Invalid signature."));
|
||||
this._socket.close;
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue